cancel
Showing results for 
Search instead for 
Did you mean: 

Booting from flash with stand alone board

Mark Cridge
Associate II
Posted on January 24, 2018 at 13:48

Hi!

I've written an application on an STM32L746RG Nucleo-64 board.  The app uses the LL library and was written on Linux using eclipse ide cube MX.

Everything is working as expected and now I want to test the application works without being connected to the PC.  I have tried to program the flash but whenever I reset the device and swap power from the PC USB slot to an external adapter the app doesn't run.  I have a suspicion that I am programming SRAM rather than flash memory.

I have created a release config in the ide and can run this.  On reboot the app does not resume. I have also installed STM32 ST-LINK Utility on a windows machine and programmed the target with this.  Checking 'Option Bytes' I see that nBoot1 is unchecked and the BOOT0 pin (CN7 pin 7) is default value.  If I load the .bin file and then select Program and Verify I have a start address of 0x8000000 and verify after programming, reset after programming is selected.  The device programming and verification run successfully and the application starts.  If I reset the power the application does not start.

Any help in getting the app to start would be appreciated!

Cheers,

mark

#flash-writing #stm32 #boot
7 REPLIES 7
Posted on January 24, 2018 at 15:24

Instrument Hard Fault and Error Handler routines to see if it dies there. Use GPIO, LED or USART to signal life. If not there way point code from Reset Handler on in.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Mark Cridge
Associate II
Posted on January 24, 2018 at 15:42

I have the LED Blinking to signal life and its fine when connected to PC.  How do I change the reset handler?

Posted on January 24, 2018 at 18:00

Here we craft assembler to signal to pins or data via USART.

Update the firmware on the ST-LINK, V2J25 had some issues clamping the device in reset from a USB Charger type supply

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Mark Cridge
Associate II
Posted on January 25, 2018 at 11:26

I was hoping that it would be easier to do than that.  I need to be able to give the Sales and Marketing dept a demo they can take on the road!

Posted on January 25, 2018 at 14:21

The boards should run off a USB Juice Box type battery with no effort. Built demos and long term tests using those.

You're describing a problem where specific code loaded on the board is doing something odd. Make sure clock initialization structures on the stack are cleared, use '={0};' so behaviour is strongly defined.

Assuming this is an F7 board, not an L7

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 25, 2018 at 19:27

The board is an STM32L476 part number is NUCLEO-L476RG

Does this change things?

Posted on January 25, 2018 at 20:14

The Nucleo boards should work fine unmodified.

You need to check the code, make sure it is not stuck in a loop somewhere, where clocks/pll come up, or in the Error or Hard Fault Handlers.

That local/auto variables/structures are fully initialized.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..