Skip to content

7.0.0-Alpha.4 (2021-07-15) can't boot on Feather STM32F405 Express. #5004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
water5 opened this issue Jul 14, 2021 · 6 comments · Fixed by #5175
Closed

7.0.0-Alpha.4 (2021-07-15) can't boot on Feather STM32F405 Express. #5004

water5 opened this issue Jul 14, 2021 · 6 comments · Fixed by #5175
Assignees
Milestone

Comments

@water5
Copy link

water5 commented Jul 14, 2021

CircuitPython version

CircuitPython 7.0.0-Alpha.4 on 2021-07-15, Feather STM32F405 Express.

Code/REPL

None

Behavior

NeoPixel indicator short blinking (green) several times, then off, no REPL, CIRCUITPY drive not appear.

Description

No response

Additional information

No response

@water5 water5 added the bug label Jul 14, 2021
@jerryneedell
Copy link
Collaborator

jerryneedell commented Jul 14, 2021

Try the 'absolute newest' build from "S3" https://circuitpython.org/board/feather_stm32f405_express/
7.0 .0 alpha4 did not work for me either (as you described) but the latest build does work

@water5
Copy link
Author

water5 commented Jul 14, 2021

7.0.0-Alpha.4 (2021-07-15 github custom build) on 'STM32F411CE Black Pill' works fine.

@jerryneedell
Copy link
Collaborator

jerryneedell commented Jul 15, 2021

Ah - I found that 7.0.0 Alpha.4 does actually boot and mount but it took quite a long time -- maybe 20 - 30 seconds after pressing the RESET button
I am accessing it from a Linux computer (Ubuntu 20.04)



Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 7.0.0-alpha.4 on 2021-07-08; Adafruit Feather STM32F405 Express with STM32F405RG
>>> 


the DMESG log here shows it taking 15 seconds from USB disconnect (Pressed RESET) to the /dev/ttyACM0 serial port being available

[Thu Jul 15 05:51:01 2021] usb 3-3.4.4: USB disconnect, device number 67
[Thu Jul 15 05:51:03 2021] usb 3-3.4.4: new full-speed USB device number 68 using xhci_hcd
[Thu Jul 15 05:51:16 2021] usb 3-3.4.4: New USB device found, idVendor=239a, idProduct=805a, bcdDevice= 1.00
[Thu Jul 15 05:51:16 2021] usb 3-3.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Thu Jul 15 05:51:16 2021] usb 3-3.4.4: Product: Feather STM32F405 Express
[Thu Jul 15 05:51:16 2021] usb 3-3.4.4: Manufacturer: Adafruit Industries LLC
[Thu Jul 15 05:51:16 2021] usb 3-3.4.4: SerialNumber: 3C00260011504D3550373320
[Thu Jul 15 05:51:16 2021] cdc_acm 3-3.4.4:1.0: ttyACM0: USB ACM device

also same with newest. build

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.

Adafruit CircuitPython 7.0.0-alpha.4-67-ge3bc800bb on 2021-07-15; Adafruit Feather STM32F405 Express with STM32F405RG
>>> 




@jepler jepler added this to the 7.0.0 milestone Jul 15, 2021
@tannewt tannewt added the stm label Jul 15, 2021
@jepler jepler self-assigned this Jul 15, 2021
@jepler
Copy link

jepler commented Aug 18, 2021

I see the same, with #5172 (just in case it was a tinyusb bug that was subsequently fixed):

Aug 18 10:30:31 localhost kernel: [2395904.328570] usb 3-1.3: new full-speed USB device number 110 using xhci_hcd
Aug 18 10:30:31 localhost kernel: [2395904.447250] usb 3-1.3: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
Aug 18 10:30:31 localhost kernel: [2395904.447255] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 18 10:30:31 localhost kernel: [2395904.447257] usb 3-1.3: Product: STM32  BOOTLOADER
Aug 18 10:30:31 localhost kernel: [2395904.447259] usb 3-1.3: Manufacturer: STMicroelectronics
Aug 18 10:30:31 localhost kernel: [2395904.447260] usb 3-1.3: SerialNumber: 20843696424D
Aug 18 10:31:55 localhost kernel: [2395988.136101] usb 3-1.3: USB disconnect, device number 110
Aug 18 10:31:56 localhost kernel: [2395989.893231] usb 3-1.3: new full-speed USB device number 111 using xhci_hcd
Aug 18 10:32:12 localhost kernel: [2396005.857330] usb 3-1.3: New USB device found, idVendor=239a, idProduct=805a, bcdDevice= 1.00
Aug 18 10:32:12 localhost kernel: [2396005.857334] usb 3-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 18 10:32:12 localhost kernel: [2396005.857335] usb 3-1.3: Product: Feather STM32F405 Express
Aug 18 10:32:12 localhost kernel: [2396005.857336] usb 3-1.3: Manufacturer: Adafruit Industries LLC
Aug 18 10:32:12 localhost kernel: [2396005.857337] usb 3-1.3: SerialNumber: 420052000F504D4254363220
Aug 18 10:32:15 localhost kernel: [2396008.559669] cdc_acm 3-1.3:1.0: ttyACM1: USB ACM device
Aug 18 10:32:21 localhost kernel: [2396013.965380] usb-storage 3-1.3:1.2: USB Mass Storage device detected
Aug 18 10:32:21 localhost kernel: [2396013.965822] scsi host9: usb-storage 3-1.3:1.2
Aug 18 10:32:24 localhost kernel: [2396017.568679] scsi host9: scsi scan: INQUIRY result too short (5), using 36
Aug 18 10:32:24 localhost kernel: [2396017.568687] scsi 9:0:0:0: Direct-Access     Adafruit Feather STM32F40 1.0  PQ: 0 ANSI: 2
Aug 18 10:32:24 localhost kernel: [2396017.568997] sd 9:0:0:0: Attached scsi generic sg2 type 0
Aug 18 10:32:27 localhost kernel: [2396020.271462] sd 9:0:0:0: [sdc] 4089 512-byte logical blocks: (2.09 MB/2.00 MiB)
Aug 18 10:32:28 localhost kernel: [2396021.172777] sd 9:0:0:0: [sdc] Write Protect is off
Aug 18 10:32:28 localhost kernel: [2396021.172783] sd 9:0:0:0: [sdc] Mode Sense: 03 00 00 00
Aug 18 10:32:29 localhost kernel: [2396022.073096] sd 9:0:0:0: [sdc] No Caching mode page found
Aug 18 10:32:29 localhost kernel: [2396022.073102] sd 9:0:0:0: [sdc] Assuming drive cache: write through
Aug 18 10:32:34 localhost kernel: [2396027.494522]  sdc: sdc1
Aug 18 10:32:39 localhost kernel: [2396032.899412] sd 9:0:0:0: [sdc] Attached SCSI removable disk

@jepler
Copy link

jepler commented Aug 18, 2021

What do y'all have in code.py? I bisected the problem I was seeing to the merge of #3191 (between beta.2 and rc.0) but it went away after moving my code.py out of the way. code.py contained some code to use canbus, but there was no working bus.

The code I had was:

import struct

import board
import canio
import digitalio

# If the CAN transceiver has a standby pin, bring it out of standby mode
if hasattr(board, 'CAN_STANDBY'):
    standby = digitalio.DigitalInOut(board.CAN_STANDBY)
    standby.switch_to_output(False)

# If the CAN transceiver is powered by a boost converter, turn on its supply
if hasattr(board, 'BOOST_ENABLE'):
    standby = digitalio.DigitalInOut(board.CAN_STANDBY)
    standby.switch_to_output(True)

# Use this line if your board has dedicated CAN pins. (Feather M4 CAN and Feather STM32F405)
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
# On ESP32S2 most pins can be used for CAN.  Uncomment the following line to use IO5 and IO6
#can = canio.CAN(rx=board.IO6, tx=board.IO5, baudrate=250_000, auto_restart=True)
listener = can.listen(matches=[canio.Match(0x408)], timeout=.9)

old_bus_state = None
old_count = -1

while True:
    bus_state = can.state
    if bus_state != old_bus_state:
        print(f"Bus state changed to {bus_state}")
        old_bus_state = bus_state

    message = listener.receive()
    if message is None:
        print("No messsage received within timeout")
        continue

    data = message.data
    if len(data) != 8:
        print(f"Unusual message length {len(data)}")
        continue

    count, now_ms = struct.unpack("<II", data)
    gap = count - old_count
    old_count = count
    print(f"received message: count={count} now_ms={now_ms}")
    if gap != 1:
        print(f"gap: {gap}")

@jepler
Copy link

jepler commented Aug 18, 2021

.. and I can go all the way back up to 7.0.0-alpha.6 with no code.py and all is well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants