2018-01-24 04:48 AM
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 #boot2018-01-24 06:24 AM
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.
2018-01-24 06:42 AM
I have the LED Blinking to signal life and its fine when connected to PC. How do I change the reset handler?
2018-01-24 10:00 AM
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
2018-01-25 02:26 AM
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!
2018-01-25 06:21 AM
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
2018-01-25 11:27 AM
The board is an STM32L476 part number is NUCLEO-L476RG
Does this change things?
2018-01-25 12:14 PM
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.