fix stlinkv2 for FST-01's LED
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2012-07-09 Niibe Yutaka <gniibe@fsij.org>
|
2012-07-09 Niibe Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* tool/stlinkv2.py (stlinkv2.setup_gpio): Fix GPIOB_CRL.
|
||||||
|
|
||||||
* test/rsa_keys.py (integer_to_bytes_256): Rename from
|
* test/rsa_keys.py (integer_to_bytes_256): Rename from
|
||||||
integer_to_bytes and it should be exactly 256-byte long.
|
integer_to_bytes and it should be exactly 256-byte long.
|
||||||
|
|
||||||
|
|||||||
@@ -101,10 +101,9 @@
|
|||||||
* PA5 - Alternate Push pull output (SPI1_SCK)
|
* PA5 - Alternate Push pull output (SPI1_SCK)
|
||||||
* PA6 - Alternate Push pull output (SPI1_MISO)
|
* PA6 - Alternate Push pull output (SPI1_MISO)
|
||||||
* PA7 - Alternate Push pull output (SPI1_MOSI)
|
* PA7 - Alternate Push pull output (SPI1_MOSI)
|
||||||
|
* PA10 - Push pull output (USB 1:ON 0:OFF)
|
||||||
* PA11 - input with pull-up (USBDM)
|
* PA11 - input with pull-up (USBDM)
|
||||||
* PA12 - input with pull-up (USBDP)
|
* PA12 - input with pull-up (USBDP)
|
||||||
* Everything input with pull-up except:
|
|
||||||
* PA10 - Push pull output (USB 1:ON 0:OFF)
|
|
||||||
*/
|
*/
|
||||||
#define VAL_GPIOACRL 0xBBB38888 /* PA7...PA0 */
|
#define VAL_GPIOACRL 0xBBB38888 /* PA7...PA0 */
|
||||||
#define VAL_GPIOACRH 0x88888388 /* PA15...PA8 */
|
#define VAL_GPIOACRH 0x88888388 /* PA15...PA8 */
|
||||||
|
|||||||
@@ -227,8 +227,8 @@ class stlinkv2(object):
|
|||||||
self.write_memory_u32(GPIOA+0x04, 0x88888383) # CRH
|
self.write_memory_u32(GPIOA+0x04, 0x88888383) # CRH
|
||||||
self.write_memory_u32(GPIOA+0x00, 0xBBB38888) # CRL
|
self.write_memory_u32(GPIOA+0x00, 0xBBB38888) # CRL
|
||||||
self.write_memory_u32(GPIOB+0x0c, 0xffffffff) # ODR
|
self.write_memory_u32(GPIOB+0x0c, 0xffffffff) # ODR
|
||||||
self.write_memory_u32(GPIOB+0x04, 0x88888883) # CRH
|
self.write_memory_u32(GPIOB+0x04, 0x88888888) # CRH
|
||||||
self.write_memory_u32(GPIOB+0x00, 0x88888888) # CRL
|
self.write_memory_u32(GPIOB+0x00, 0x88888883) # CRL
|
||||||
|
|
||||||
# For FST-01-00 and FST-01: LED off, USB off
|
# For FST-01-00 and FST-01: LED off, USB off
|
||||||
def finish_gpio(self):
|
def finish_gpio(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user