Skip to main content
nibble9
Associate
August 18, 2022
Question

writeMemory() writes FFFFFFFF in locations I'm writing 00000000

  • August 18, 2022
  • 1 reply
  • 2090 views

I'm passing to writeMemory()

  • start address of where to write the char data
  • a pointer to char data
    • initialized to all 0's, then 16 bytes of non-zero data over it
  • char data block size = 100

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

This topic has been closed for replies.

1 reply

nibble9
nibble9Author
Associate
August 18, 2022

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?

Tesla DeLorean
Guru
August 18, 2022

>>I suppose this is a bug.

When you make an actual determination perhaps write it up properly.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Bob S
Super User
August 19, 2022

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?