-
Notifications
You must be signed in to change notification settings - Fork 169
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
STM32F4 SPI + ESP32_S3 FG communication issue #522
Comments
Did you use master code base or feature/esp_as_mcu_host branch? |
can you hold up till 15 nov? We are porting the https://github.com/espressif/esp-hosted/tree/feature/esp_as_mcu_host which is dedicated for mcu, by 15 nov. to answer your original question, you shouldn't need to replace the file on your own. ideally the https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/host/stm32/proj/prepare_project.bat should have done. but check the https://github.com/espressif/esp-hosted/blob/master/esp_hosted_fg/docs/MCU_based_host/Getting_started.md for all the details, how it should be used.. |
hi, I've used that bat file and I followed the guide, all the symbols,path and build variables are set. I think the issue is somewhere with SPI communication: Can you help what this error message is referring to exactly ? |
Spi buffer size is expected to be 1600 bytes only, both the sides. The log shows that the spi communication is not correct. Basically you can lower the frequency for spi and cross check if you have same spi mode in use. If you are using jumper wires, ensure you use good, equal lengthed (<cm) wires. The bytes interpreted are shifted bytes. |
Hello @czagaadam , it looks like you are using master branch right now. We are going to a friendly port, which we also plan to test on sample stm32 (h7), over MCU only branch, at https://github.com/espressif/esp-hosted/tree/feature/esp_as_mcu_host. Most probably by Mid November. This change would have offer the easier port layer, with easy sample network stack integration. Finally, please I would like to add, all the efforts by now you have put are not totally waste. In fact, the changes and verification method would in fact would be helpful, suppliment and also comparable at some places. Please let us know what you think ahead. |
Checklist
Issue or Suggestion Description
Can someone help how to proceed with STM32F4 SPI + ESP32_S3 FG firmware implementation?
Where I stuck:
I generated a normal STM32F4 (STM32F407VGTX) project with CubeIDE which includes:
SPI1, UART5, FREERTOS(CMSIS_V1), + CS, RESET, HANDSHAKE, DATA READY pins.
I followed the guide and put everything together in cube IDE.
I can compile the firmware but I think I missed something or do not understand something well.
So my main.c contains this:
I removed freertos.c file and I'm using the MX_FREERTOS_Init implementation from app_main.c
Running the application and putting a break point in MX_FREERTOS_Init in from app_main.c:
For me the value of transport_driver_event_handler looks strange:
Storing the event handler in transport_init in spi_drv.c
Continue running the application:
I'm getting an ESP-Hosted for ESP32-C2/C3/C6/S2/S3 message in CoolTerm, but error from ESP
E (144959) SPI_DRIVER: rx_pkt len+offset[131070]>max[1600], dropping it
and threads seems to be blocked
Modification:
I made a small modification in spi_drv.c I had to comment out these lines because application thinks STM32 is connected to a ESP32 instead of ESP32_S3:
If I uncomment them in CoolTerm I'm getting:
ESP-Hosted for ESP32 message instead of ESP-Hosted for ESP32-C2/C3/C6/S2/S3
and no error message from ESP, but I'm using ESP32_S3
Do I have to run any default task in MX_FREERTOS_Init in from app_main.c: ?
Why application thinks it is an ESP instead of ESP32_S3?
Why I'm getting this error: E (144959) SPI_DRIVER: rx_pkt len+offset[131070]>max[1600], dropping it
Thank you!
The text was updated successfully, but these errors were encountered: