cores: unoq: add Serial3 same pins as Wire (SCL/SDA)#487
Conversation
|
@pillo79 @pennam @dani-clo and all, It would be interesting to get feedback from some of you from Arduino. Like: maybe how to reduce the amount of memory used by Serial objects that are not used within a sektch. Secondary Side note: probably a different subject and maybe not easily doable with Zephyr: |
Sometimes you need another Hardware Uart that is not also being used as the Zephyr Monitor. So I created Serial3 using the hardware usart3 on the same pins as Wire (SCL, SDA). I tried it with current sources including fix for the UNOQ double floating point issue. Wishlist to investigate, it would be great to be able to add these types of alternate objects, however currently HardwareSerial objects come with a memory overhead as the buffers for the RX and TX queues are part of the main structure and as such allocated with the object was created. Would be nice to have an alternative way to not have these as prt of the structure and only allocated if someone actually calls SerialX.begin(...)
Built
|
| Artifact | Board | Core | Tests | RAM | Sketches | Warnings | Errors |
|---|---|---|---|---|---|---|---|
✅* zephyr_contrib |
ek_ra8d1
| 📗 | ✅* |
11.9% |
2 | 2 | - |
frdm_mcxn947
| 7 🏷️ | ✅* |
58.0% |
2 | 2 | - | |
frdm_rw612
| 2 🏷️ | ✅* |
83.0% |
2 | 2 | - | |
✔️* zephyr_main |
giga
| 5 🏷️ | ✅* |
54.7% |
58 | 16 | - |
nano33ble
| 1 🏷️ | ✅* |
78.8% |
30 | 10 | - | |
nano_matter
| 1 🏷️ | ✅* |
|
22 | 8 | - | |
nicla_vision
| 5 🏷️ | ✔️* |
57.0% |
52 | 8 | (10*) | |
niclasense
| 2 🏷️ | ✅* |
|
26 | 12 | - | |
opta
| 5 🏷️ | ✅* |
57.7% |
62 | 18 | - | |
portentac33
| 3 🏷️ | ✔️* |
|
66 | 8 | (8*) | |
portentah7
| 4 🏷️ | ✅* |
58.5% |
74 | 16 | - | |
✅* zephyr_unoq |
unoq
| 📗 | ✅* |
26.9% |
56 | 8 | - |
Legend
Board Test Status description 🔥 🔥 Test run failed to complete. ❌ 🔴 Test completed with unexpected errors. ✔️* 🚫 Test completed with errors, but all are known/expected. ✅* 🟡 Test completed with some warnings; no errors detected. ✅ 🟢 Test passed successfully, with no warnings or errors. 🌑 🌑 Test was skipped.
|
Memory usage change @ 6f631b8
Click for full report table
Click for full report CSV |
One of things I have been doing is getting a Lidar working on the Q. Specifically, using Serial3 to collect all the lidar data from the device and the using routerbridge to transfer 4x360 int arrays across the bridge. Using Serial3 has helped in the collecting the data reliably!!!! Also I noticed on the forum for the Q someone was asking about alt serial |
Sometimes you need another Hardware Uart that is not also being used as the Zephyr Monitor.
So I created Serial3 using the hardware usart3 on the same pins as Wire (SCL, SDA).
I tried it with current sources including fix for the UNOQ double floating point issue.
EDIT: I was able to use those pins as either Wire object or as Serial3 object and test sketches worked.
Wishlist to investigate, it would be great to be able to add these types of alternate objects, however currently HardwareSerial objects come with a memory overhead as the buffers for the RX and TX queues are part of the main structure and as such allocated with the object was created. Would be nice to have an alternative way to not have these as prt of the structure and only allocated if someone actually calls SerialX.begin(...)