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

Сompatibility with STM32F401 and optimization #695

Open
AlexandrJet opened this issue Jun 26, 2024 · 1 comment
Open

Сompatibility with STM32F401 and optimization #695

AlexandrJet opened this issue Jun 26, 2024 · 1 comment

Comments

@AlexandrJet
Copy link

AlexandrJet commented Jun 26, 2024

Hi. I tested my Ai-thinker RA-02 (sx1278) on Arduino Nano and STM32F401 ( with STM32duino, no optimization). After testing i got interesting situation: the same code, based on dump register example, got a different results:

Fragment of results on STM32:
0x3C: 0x3C
0x3D: 0x3D
0x3E: 0x3E
0x3F: 0x3F
0x40: 0x40
0x41: 0x41
0x42: 0x42
0x43: 0xC3
0x44: 0xC4
0x45: 0x45
0x46: 0x8E
0x47: 0x47

Fragment of results on Nano:
0x3C: 0x0
0x3D: 0xAF
0x3E: 0x0
0x3F: 0x0
0x40: 0x0
0x41: 0x0
0x42: 0x12
0x43: 0x24
0x44: 0x2D
0x45: 0x0
0x46: 0x3
0x47: 0x0
Look at 0x42 register. The value of 0x42 must be 0x12, but on STM32 we got another. Why is this happening? - I don`t know...

I`m not sure that is a LoRa library problem, but i think i must informed you.
I will make the same issue on STM32duino page.

Also, what do you think to make readRegister() and writeRegister() like as macros?

P.S. - Sorry for my English

@miladnorouziii
Copy link

Hi, please be aware that for working with spi you need to send some dummy packet and read the values. did you handle the dummy packet? Search it on Google and read about spi dummy packets., Also make sure you set the SPI bus clk properly.

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