STM32L476 with external flash not work after re-power up

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

STM32L476 with external flash not work after re-power up

Post by shaoziyang » Sun Jul 28, 2019 4:30 am

I have diy a STM32L476RG board, with a 32KHz crystal and 1Mbytes external flash.

If I not using external 1Mbyte flash, it works fine. If I enable external flash, after upgrade firmware with ST dfuse util and click "leave DFU mode" button, it works and can read/write 1Mbytes pyb flash. But when I disconnect USB cable and reconnect again, it will not work, it will show pyb flash disk, but disk can't be read/write. And it maybe works after long time wait (several minutes) sometimes. And if I only enter DFU mode and click "leave DFU mode" button (not upgrade firmware), it will works.

What might have caused it?

I use micropython 1.11, and modify board define from STM32L476DISC.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: STM32L476 with external flash not work after re-power up

Post by jimmo » Mon Jul 29, 2019 1:15 am

Perhaps there's something wrong with the config and accessing the flash is causing something to be overwritten. (i.e. straight after DFU everything is fine, then subsequently there's been some corruption).

Can you share your board definition (link to github maybe?).

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: STM32L476 with external flash not work after re-power up

Post by shaoziyang » Mon Jul 29, 2019 6:11 am

My define:
PYBL476.ZIP
(5.51 KiB) Downloaded 222 times

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: STM32L476 with external flash not work after re-power up

Post by shaoziyang » Tue Jul 30, 2019 3:18 am

I found the problem is cause by ldo, I increase capacitance, and it work now.

Post Reply