Re: Can not initialize STM32L476 UART
Posted: Tue Nov 12, 2019 5:38 am
Hello Jimmo
I plugged the NUCLEO into my linux box via the USB mini connector with the ST Link jumpers on and BOOT0 disconnected.
I followed your instructions;
# from wherever you cloned micropython:
cd mpy-cross -easy
make -j -did something
cd ../ports/stm32 -easy
make submodules -did something looks good
make -j BOARD=NUCLEO_L476RG -the screen rolled with error messages for about 20 minutes
make BOARD=NUCLEO_L476RG deploy -it went through for a couple of seconds but shows errors
Hit reset.
No Luck.
Tried again but this time I changed the order. ie changed the config file first then did the make 'stuff'
Looks better but no cigar when it came to deploy, so used window to download the dfu file through the direct usb connection ie PA11 PA12. That upgraded the firmware successfully.
Now plug the NUCLEO back into the Linux box, do a dmesg ;
[24106.404299] usb 6-2: new full-speed USB device number 19 using uhci_hcd
[24106.601101] usb 6-2: New USB device found, idVendor=f055, idProduct=9800
[24106.601104] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24106.601105] usb 6-2: Product: Pyboard Virtual Comm Port in FS Mode
[24106.601106] usb 6-2: Manufacturer: MicroPython
[24106.601108] usb 6-2: SerialNumber: 205737A3424B
[24106.604169] usb-storage 6-2:1.0: USB Mass Storage device detected
[24106.604468] scsi host15: usb-storage 6-2:1.0
[24106.604734] cdc_acm 6-2:1.1: ttyACM0: USB ACM device
[24107.637243] scsi 15:0:0:0: Direct-Access MicroPy pyboard Flash 1.00 PQ: 0 ANSI: 2
[24107.638168] sd 15:0:0:0: Attached scsi generic sg8 type 0
[24107.642139] sd 15:0:0:0: [sdg] 1280 512-byte logical blocks: (655 kB/640 KiB)
[24107.645157] sd 15:0:0:0: [sdg] Write Protect is off
[24107.645160] sd 15:0:0:0: [sdg] Mode Sense: 03 00 00 00
[24107.648123] sd 15:0:0:0: [sdg] No Caching mode page found
[24107.648129] sd 15:0:0:0: [sdg] Assuming drive cache: write through
[24107.669242] sdg: sdg1
[24107.688202] sd 15:0:0:0: [sdg] Attached SCSI removable disk
[24107.933115] FAT-fs (sdg1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[24108.086606] FAT-fs (sdg1): error, invalid access to FAT (entry 0x00003a0a)
[24108.086610] FAT-fs (sdg1): Filesystem has been set read-only
screen /dev/ttyACM0 sort of works, it starts then it dropped out.
I will have to get back to this later, really have to go now.
Thanks again
I plugged the NUCLEO into my linux box via the USB mini connector with the ST Link jumpers on and BOOT0 disconnected.
I followed your instructions;
# from wherever you cloned micropython:
cd mpy-cross -easy
make -j -did something
cd ../ports/stm32 -easy
make submodules -did something looks good
make -j BOARD=NUCLEO_L476RG -the screen rolled with error messages for about 20 minutes
make BOARD=NUCLEO_L476RG deploy -it went through for a couple of seconds but shows errors
Hit reset.
No Luck.
Tried again but this time I changed the order. ie changed the config file first then did the make 'stuff'
Looks better but no cigar when it came to deploy, so used window to download the dfu file through the direct usb connection ie PA11 PA12. That upgraded the firmware successfully.
Now plug the NUCLEO back into the Linux box, do a dmesg ;
[24106.404299] usb 6-2: new full-speed USB device number 19 using uhci_hcd
[24106.601101] usb 6-2: New USB device found, idVendor=f055, idProduct=9800
[24106.601104] usb 6-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[24106.601105] usb 6-2: Product: Pyboard Virtual Comm Port in FS Mode
[24106.601106] usb 6-2: Manufacturer: MicroPython
[24106.601108] usb 6-2: SerialNumber: 205737A3424B
[24106.604169] usb-storage 6-2:1.0: USB Mass Storage device detected
[24106.604468] scsi host15: usb-storage 6-2:1.0
[24106.604734] cdc_acm 6-2:1.1: ttyACM0: USB ACM device
[24107.637243] scsi 15:0:0:0: Direct-Access MicroPy pyboard Flash 1.00 PQ: 0 ANSI: 2
[24107.638168] sd 15:0:0:0: Attached scsi generic sg8 type 0
[24107.642139] sd 15:0:0:0: [sdg] 1280 512-byte logical blocks: (655 kB/640 KiB)
[24107.645157] sd 15:0:0:0: [sdg] Write Protect is off
[24107.645160] sd 15:0:0:0: [sdg] Mode Sense: 03 00 00 00
[24107.648123] sd 15:0:0:0: [sdg] No Caching mode page found
[24107.648129] sd 15:0:0:0: [sdg] Assuming drive cache: write through
[24107.669242] sdg: sdg1
[24107.688202] sd 15:0:0:0: [sdg] Attached SCSI removable disk
[24107.933115] FAT-fs (sdg1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[24108.086606] FAT-fs (sdg1): error, invalid access to FAT (entry 0x00003a0a)
[24108.086610] FAT-fs (sdg1): Filesystem has been set read-only
screen /dev/ttyACM0 sort of works, it starts then it dropped out.
I will have to get back to this later, really have to go now.
Thanks again