-
Notifications
You must be signed in to change notification settings - Fork 43
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
ESP32 new version S2 S3 C3 #25
Comments
I won't, since it does not use properly my library. |
Can we crowd fund the work needed to get esp32-s3 support? |
Do you need it personally or commercially? Why S3? |
Hi Timo!
The few manufacturers of low cost boat usable AMOLED displays only use this MCU for products and/or on their development kit boards.
They are DWO and their client LilyGo.
https://www.lilygo.cc/products/t4-s3 (https://www.lilygo.cc/products/t4-s3)
https://www.dwo.net.cn/pr.jsp?_pp=0_316_1_-1 (https://www.dwo.net.cn/pr.jsp?_pp=0_316_1_-1)
Plus the only good quality low cost easy to use graphics library LVGL adds extra problems, interfering in some way with TWAI on the Expressif S3. This is possibly due to some error in the Espxx lib that at least compiles and runs (fails after some time when LVGL controls SPI) with your excellent NMEA2000 library.
It is for an open source boating mini multifunction display project. And of course it should be completely libre software part of your esp32 extensión.
Cheers,
Gary
June 17, 2024 1:59 AM, "Timo Lappalainen" ***@***.*** ***@***.******@***.***>)> wrote:
Do you need it personally or commercially? Why S3?
—
Reply to this email directly, view it on GitHub (#25 (comment)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AELSHMQNHLXOHY7F634ZL2LZHZUKLAVCNFSM6AAAAABICGOVRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZSGI2DCMBRHE).
You are receiving this because you commented.Message ID: ***@***.***>
|
+1 for adding support to the Lilygo T Display S3 board. These are great boards that have an attached screen, thus able to display the data on the same board, making it great for a small footprint device. |
I hacked together something that you can steal or take some inspiration from. https://github.com/skarlsson/NMEA2000_twai. I used it successfully (last week) for 3 devices esp32, esp32s3 and espc3 (olimex card and xiao) using esp idf 5.x |
@ttlappalainen does https://github.com/skarlsson/NMEA2000_twai conform to how you would expect support for ESP32 C3,S3 with the twai library support to look ? It seems more direct and simpler than over variants that have been shared in PRs and issues here, but looks quite different from the original ESP32 version as it uses the twai driver methods. (ie -ISR replaced by twai queues, + a task) The only problem I have found so far is https://github.com/skarlsson/NMEA2000_twai/blob/main/NMEA2000_esp32.cpp#L94C3-L99C23 fails to compile and had to be replaced by
probably due to a missing compiler flag in the defaults. Cant see why, the code matches the header file. error was
@skarlsson I will do a PR with the change and details on my setup. I am targeting esp32-C3 from waveshare and ebay for the firmware for https://github.com/ieb/NMEA2000_Booklet. Why ESP32-C3 ? Because the pcb looks more elegant than the version using a ESP32 Wroom, and I needed to integrate a JDB BMS. Might regret that and revert. |
You could also check this https://github.com/offspring/NMEA2000_esp32/tree/add-esp32s3 . I have not yet had time to test it and do merge. |
Forgot to mention that twai is not in old framework version. So dependencies may be tested according to framework version not just by ESP32 model. |
I'm not aware of any differences in 5.x version for twai but I have been running 5.3. Also on many other places I've resorted to C++ style init - not C. ie twai_message_t message = {}; and then assigning individual members - so maybe this is the way here as well. for the record - I was hoping @ttlappalainen would pick this up since I've been jumping in and out of can related things over the years but never stayed for maintenance. |
@ieb you pullrequest worked for me so I merged it. And it was likely a compiler thing due to the unusual union / struct thing. |
Tried this one, but I am using a C3 not a S3. Also tried to create a C3 header file for that, but all sorts of data structures were different or missing which is why I went for the twai version from @skarlsson which looked cleaner. I have that loaded and running on a bare board, just getting a pcb cut to test with a driver on a bus. Will report back. |
|
The code from @skarlsson works good, no problems on one of the cheap ebay esp32C3 modules. It correctly recognises when the bus driver (TJ1050@5v with r divider on rx) is disconnected and communicates with a older ESP32 on the same bus simulating most of the messages on a Raymarine SeatalkNG bus, as would be expected. No issues seen. pcb worked fine first time. Heap seems completely stable. Will leave running for a few days to see if I can make it panic. |
Ran for > 24h with no failures or painics, although the esp32C3 is single core so race conditions are less likely. Seems to be stable for me. |
Hello, thank you for your fantastic libraries
Unfortunately Arduino detects several errors when using the new ESP32 (S2,S3,C3). I'm currently trying
sergei/NMEA2000_esp32_twai (https://github.com/sergei/NMEA2000_esp32_twai)
You could implement the right libraries for the various devices in the NMEA2000_CAN.h file.
#elif USE_N2K_CAN == USE_N2K_ESP32_CAN
#if CONFIG_IDF_TARGET_ESP32S2
#include <NMEA2000_esp32_twai.h>
tNMEA2000 &NMEA2000=(new NMEA2000_esp32_twai());
#elif CONFIG_IDF_TARGET_ESP32S3
#include <NMEA2000_esp32_twai.h>
tNMEA2000 &NMEA2000=(new NMEA2000_esp32_twai());
#elif CONFIG_IDF_TARGET_ESP32
#include <NMEA2000_esp32.h>
tNMEA2000 &NMEA2000=*(new tNMEA2000_esp32());
#else
#error "Unrecognized ESP."
#endif
The text was updated successfully, but these errors were encountered: