Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPIF_WritePage corrupting source buffer #43

Open
wolfgangbregel opened this issue Dec 24, 2023 · 6 comments
Open

SPIF_WritePage corrupting source buffer #43

wolfgangbregel opened this issue Dec 24, 2023 · 6 comments

Comments

@wolfgangbregel
Copy link

Hi all,

I experience that SPIF_WritePage function corrupts the source buffer (other write operations will do so aswell).
This is due to the fact that SPIF_WriteFn calls SPIF_TransmitReceive() which in turn sets its rx and tx buffer to source buffer, and by this corrupts the source buffer.
Wouldn't it be better to call a transmit only function here?

Best regards.

Wolf

@nimaltd
Copy link
Owner

nimaltd commented Dec 24, 2023

Hello. Thanks for your response. I had not this problem. But if you are sure about that, i will use transmit insted of transmitreceive.

@wolfgangbregel
Copy link
Author

Hello,

I'm sure about this, as I tested it on real hardware (Blackpill STM32F411CE + 64Mbit Flash 25Q64JVS).
BTW the same applies to the read functions, where a receive only function would be the better choise.

I'll do some more testing and stress tests and will report if issues arrive.

Thanks for your work and the seemless integration into the STMCube ecosystem.

Best regards,
Wolf

@nimaltd
Copy link
Owner

nimaltd commented Dec 24, 2023

your welcome, I have updated the package. please try again.

@wolfgangbregel
Copy link
Author

That was fast!

I updated to the new version. It works as expected, the source buffer stays untouched!
The SPIF_Receive function is updated too - good job.
I'll do some more in depth testing an will report.
One more thing to consider for fututre releases:

Im tinkering with Azure RTOS. You might add a selection in the conf file togehther with CMSIS V1/V1 in order to use the RTOS sleep function.

Regards,

Wolf

@nimaltd
Copy link
Owner

nimaltd commented Dec 24, 2023

Thanks. I am waiting for your response after test. ;)

@nimaltd
Copy link
Owner

nimaltd commented Mar 28, 2024

I have updated the LIB. please try again for any devices you have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants