-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
write_value parameter of spi.readinto() is incompatible with STM32F405 Feather #13
Comments
Thanks for bringing this to my attention. I personally have not tested the library under circuitpython 6 (note that you're using a alpha release which can be unstable). This error is from the check on this line. There 2 things that could be wrong
I think you have the |
How should I test the |
Try downgrading the firmware on your STM32F405RG to CircuitPython 5 latest stable release Also if you're using the |
@water5 any progress? After you have To verify To verify proper datatype of the I don't have an STM32F405 feather to test this library on, so I cannot personally reproduce this issue. Everything I'm reading about that board on Adafruit seems like CircuitPython support is still being developed. Normally I would recommend the Arduino IDE (or platformIO) and TMRh20's RF24 library, but it seems that library hasn't added support for the STM32 family (as far as I know). |
Thanks for your answer.
and the nrf.address_length 's value can't change,
and the nrf._addr_len , address 's value:
Because refer this document : https://circuitpython-nrf24l01.readthedocs.io/en/stable/index.html , But on Feather STM32F405 Express does't has GND -> GND Feather STM32F405 Express already change: Is it possible some Pin status affect registers value readed ? |
Have you installed CircuitPython 5 (latest stable release) on your STM32 Feather? The IRQ pin setting ( Thank you for also showing me the value of the internal So technically this is what is supposed to happen: I've made a commit to my "lite-beta" branch (currently my developing branch) so that
If the register does not contain the value 3, then I have no idea what's going wrong (assuming you have not changed the rf24.py file). Note that the specification sheet says that the SetupAW register can only contain the value (in binary) |
I disconnect IRQ pin, and:
All test using .mpy file, because if use .py file, will arise If possible, please test |
Ok if you got the same I developed the library on the itsybitsy m4 using the .py file and a multitude of other files on circuitpy drive, and I never ran into that memory error. Only the atsamd21 gives me that memory error. I will set up the M4 with the circuitPython 6 alpha build and get back to you. EDIT: Found this comment about the memory. Apparently it's actually smaller RAM size than the store page says for the STM32 Feather |
ok, I've run the Make sure you using the right mpy filesIf you can, verify that the Debugging the hardwareIf the problem persists, have a look at the issues raised on the adafruit/circuitpython repo about the STM32 Feather. Another thing you can do to debug this error is hook up a 3-channel oscilliscope (maybe find a friend has one - they're not cheap) to capture the I/O signals on the MOSI, MISO, & SCK pins and make sure they're doing what they're supposed to. Also make sure that the STM32 Feather pins you connected to the CSN & CE pins are actually going HIGH and LOW using the digitalio library and an LED (with resistor). The STM32 Feather has a debugging port on the back to help debug the software that's running on the board. Although it requires soldiering additional pins and additional hardware to interface with this port. Typically, this tactic is used to debug custom builds of CircuitPython. I'm sorry you're experiencing this issue, but the problem is most likely not specific to this library. |
Thanks your reply, I figuring it, it looks like CircuitPython SPI bus implement on STM32F405RG issue, I try other SPI relate device (e.g. wiznet5k) on CircuitPython 5.3.1 Release, has same issue (NeoPixel LED goes off, REPL stop respone). Actually, I run this library on MicroPython works fine before : https://github.com/micropython/micropython/tree/master/drivers/nrf24l01 |
Yes, that is the source that this library started from, but it doesn't have many features that this library offers. Using dynamic payloads, disabling auto-ack packets, and appending custom payloads to the ack-packets are the major features missing in that micropython module. I read through the issues on CircuitPython about the STM32, and one of the experts kept saying that micropython support for that board should work fine. |
This issue only raise on CircuitPython 5.3.1 Release, on 6.0.0 Alpha-3, this issue looks like fixed, I run Wiznet5k (SPI interface device) on CircuitPython 6.0.0 Alpha-3 all functions OK. |
I don't understand what this sentence means. Could you try with your native language? Is this issue still a problem? Did you make sure you're using the right mpy file? I wrote a whole paragraph about it in a previous post |
My mean on CircuitPython 6.0.0 Alpha-3 SPI bus issue already fixed(but maybe not all also), I guess on CircuitPython 6.0.0 Alpha-3 this problem should not be occur. I will check all again. |
Is it possible #3381 cause |
before I release this, could you test it? circuitpython_nrf24l01-6.x-mpy-cff9267.zip You will find 2 files in the zip's |
|
Sorry. I forgot I left my lite-beta branch in an unstable state. I'm debugging as I write this. I'll get back to you when the simple_test runs on both rpi and my m4. |
updated version! This tested fine for the |
Yes, RPi(master()) -> STM32F405(slave()) works fine, STM32F405(master()) -> RPi(slave()) sometimes receive incorrect. I tested nrf24l01_simple_test.py only currently, other examples, I need more time to understanding the code. |
Yea, I've been fighting the Raspberry Pi's slower SPI transactions (seems to stem from the firmware's SPI kernel). I'm still trying to debug that issue, but it is a separate issue because its specific to the Raspberry Pi. Nonethless, this is an absolute acheivment. I couldn't have done it without you. Thank you again for bringing this to my attention. Can you close the other issue you opened on the circuitpython repo? I will post news of our success as a reminder on that issue. |
I only test something on this issue, all code improving works by you, even few understanding about nRF24L01 hardware. |
Found this issue for the TMRh20 library about STM32 compatibility. |
@water5 Please update your mpy file with the new release I have found (and fixed) a few bugs with the file I sent you. Plus I added BLE capability... |
I test it on STM32F405RG, CircuitPython 6.0.0 Alha 3,
from nrf24l01_simple_test import *
slave()
And test it on RPi with same way, not have this issue.
The text was updated successfully, but these errors were encountered: