Data is lost when passing the array to a function in other file

Hello Everyone

I'm working on a project in which some commands are transferred through USB HID.

The project is an nRF42840 based one.

The data received in nRF42840 is saved in a buffer in a .c file.

Sometimes I need to analyze the data in another file so I pass the pointer of that buffer to the external function of another file. 

The buffer is a 32 bytes array but when I pass it to the external function, sometimes not all 32 bytes are passed and when logging the buffer in the other file (in which the mentioned external function exists), I don't see all 32 bytes. 

This does not happen every time. It is random.

Can anyone help me with this?

What can possibly cause something like that? I've never faced anything like that.

I tried not passing the buffer and check its value externally in the other file instead, but it did not help.

Parents Reply Children
No Data
Related