2022-08-18 03:09 PM
I'm passing to writeMemory()
After my (C++) program finishes executing, I use the Cube Programmer tool to connect to the STM32L4 to read the memory I just wrote. I'm seeing FFFFFFFF instead of 00000000. The non-zero 16 bytes of data shows as expected.
What am I missing? Thanks
2022-08-18 03:27 PM
But if I write back to back, it works:
int writeMemoryFlag = writeMemory(systemInfoStartAddress,
systemInfoBlockPtr,
systemInfoSize);
writeMemoryFlag = writeMemory(systemInfoStartAddress,
systemInfoBlockPtr,
systemInfoSize);
Yes, I'm writing the same data again. I suppose this is a bug. Where to enter this?
2022-08-18 04:27 PM
>>I suppose this is a bug.
When you make an actual determination perhaps write it up properly.
2022-08-19 07:01 AM
Hint: where did writeMemory() come from? Doesn't look like a HAL/Cube generated function. And what does it actually do? You have the source, right?
2022-08-20 05:44 AM
writeMemory() is one of the API calls that come with the STM32 MCU. The help file is located in the install directory under ../api/doc:
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\api\doc\STM32CubeProgrammer_API.chm
2022-08-24 12:56 PM
I haven't used the CubeProgrammer API, so not sure I will be much help.
Generically:
2022-08-25 06:02 AM
There was no return error, however if there was, it would be too generic to be of any use:
CUBEPROGRAMMER_ERROR_WRITE_MEM (-10)
The programmer is STM32 CubeProgrammer using ST-LINK (V?). The driver was updated when the STM32L4 Nucleo board was setup (about 6 wks ago).
I can get the ST-LINK V? when I get to the office later today.
2022-09-02 08:16 AM
It appears it's ST-LINK V3, based on the install path:
C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\stsw-link009_v3\stlink_winusb_install.bat
The CubeProgrammer log during connect operation:
09:56:12 : STM32CubeProgrammer API v2.11.0 | Windows-32Bits
09:56:12 : ST-LINK error (DEV_CONNECT_ERR)
09:56:53 : ST-LINK SN : 066CFF504849868667105731
09:56:53 : ST-LINK FW : V2J39M27
09:56:53 : Board : NUCLEO-L496ZG
The Board model from the "Target Information" window:
STM32L496xx/L4A6xx
2022-09-02 08:43 AM
Clarification:
A downloaded driver install file was located in my Downloads area that suggests STLINK-V2 is installed. The "readme.txt" file states:
Digitally signed USB driver for ST-Link/V2 on Windows7, Windows8 and Windows10,
32 and 64 bits.
I suppose I should run the driver install that shipped with the Cube Programmer application. Then see if that fixes my issue.
When I find some free time of course.