cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 issue

julienterrier39
Associate II
Posted on February 09, 2016 at 23:18

Hi,

I'm trying to load demo SAI_audio-play from firmware package ''STM32Cube_FW_L4_V1.3.0''  into the flash but I can't, one error send me ==> Error: Flash Download failed  -  Target DLL has been cancelled.

My setting in ''option for target'' are:

device tab: STM32L476VG 

debug tab: 0690X00000605ZtQAI.png

0690X00000605XUQAY.png

0690X00000605GtQAI.png

I use as IDE keil µvision5 and I installed latest version of the linker in Keil/ARM/Stlink/USBdriver. I checked if my version was updated with ''ST-LinkUpgrade'' It's ok.

I don't understand where is my pb it seems that nothing is selected in programming algorithm but I tried with ''STM32L4xx 1MB flash'' but the problem stay... 
14 REPLIES 14
Posted on February 10, 2016 at 00:02

Try ''Connect : Under Reset'' option, or strapping BOOT0 High. You can't debug a device that powers down.

Will definitely need to have the algorithm selected in the menu.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
julienterrier39
Associate II
Posted on February 11, 2016 at 11:21

Thank you, thanks to your piece of advice, I can load the program into the flash memory.

My settings according your specification:

0690X00000605UlQAI.png

Then

0690X00000605aDQAQ.png

julienterrier39
Associate II
Posted on February 11, 2016 at 23:46

I can load te program into flash memory (SAI_AudioPlay) of my µcontroler but there is no sound from my headphone...

So I checked in debug mode and the problem is located in that part of the code: Main.c

/* Check if the buffer has been loaded in flash */
if(*((uint64_t *)AUDIO_FILE_ADDRESS) != 0x017EFE2446464952 ) Error_Handler();

I toggle towards Error_Handlers() function in while(1) loop. I am trying to solve my problem but currently I didn't find where is located the problem. Need some help plz!
julienterrier39
Associate II
Posted on February 13, 2016 at 23:36

Someone can tell me what is the program loaded by default in the STM32L476-disco ?

Example  ==> BSP ?

thanks
julienterrier39
Associate II
Posted on February 14, 2016 at 00:14

Ok I did it, just I forgot to load the audio.bin into the flash memory with ST-link utility.

Amel NASRI
ST Employee
Posted on February 18, 2016 at 17:04

Hi julien.terrier,

To answer your question: ''Someone can tell me what is the program loaded by default in the STM32L476-disco ?'':

It is the project that you find under STM32Cube_FW_L4_V1.3.0\Projects\STM32L476G-Discovery\Demonstrations.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

julienterrier39
Associate II
Posted on February 20, 2016 at 12:59

Thank you for your answer.

But someone could exlain me what's meaning of this line of code (from your own project SAI_AudioPlay):

/* Check if the buffer has been loaded in flash */
if(*((uint64_t *)AUDIO_FILE_ADDRESS) != 0x017EFE2446464952 ) Error_Handler();

Especially ==> 0x017EFE2446464952 It's flash size ? Or at least one part ? Thanks
Posted on February 20, 2016 at 16:55

A ''RIFF'' format audio file with length?

RIFF File Format

https://en.wikipedia.org/wiki/Resource_Interchange_File_Format

https://msdn.microsoft.com/en-us/library/windows/desktop/ee415713%28v=vs.85%29.aspx

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
julienterrier39
Associate II
Posted on February 21, 2016 at 18:08

Thank you, 

 According your answer 

0x017EFE2446464952

Is RIFF file and if I translate in ASCII code I obtain ==> 

 

0x017EFE2446464952

. =   

RIFF$þ(SOH)~

Better with ST-link utility I can understand your link and chunks storage.

0690X00000605a8QAA.png