Search found 301 matches

by jcsbanks
Thu Jul 05, 2018 1:27 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

The changes I am using are in my post in page 15. This way it handles a full CAN bus for hours on end with no dropped frames, with SN65HVD230. I have not measured CPU load but not had any problems.
by jcsbanks
Wed Jul 04, 2018 5:07 pm
Forum: ESP32 IDF
Topic: esp_timer: timer queue overflow
Replies: 11
Views: 5041

esp_timer: timer queue overflow

Using the high resolution timer, all is good for periods above a few microseconds. If I use a period of 0, after a handful of callbacks, I get esp_timer: timer queue overflow Obviously it is a bit of a waste to setup a timer with a callback with a time of 0, but it is sometimes convenient to save a ...
by jcsbanks
Tue Jun 19, 2018 4:56 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

This does work if heavy handed, but applicable to my application in particular. Maybe there is a way to get it just to defer CAN_isr. Was this what you mean about comparing to a value? I use TBS instead of TCS because it seems analogous to the TIE, the buffer is available even if the previous transm...
by jcsbanks
Tue Jun 19, 2018 3:16 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

int CAN_write_frame(CAN_frame_t* p_frame) { int status = 0; MODULE_CAN->IER.B.TIE = 0; if (uxQueueMessagesWaiting(tx_queue)) status = xQueueSend( tx_queue, p_frame, 0 ); else if (MODULE_CAN->SR.B.TBS) CAN_Tx(p_frame); MODULE_CAN->IER.B.TIE = 1; return status; } Somehow this is missing 1% of transmi...
by jcsbanks
Tue Jun 19, 2018 10:43 am
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

To implement the CAN Tx queue using interrupt: int CAN_write_frame(CAN_frame_t* p_frame) { if (MODULE_CAN->SR.B.TBS && !uxQueueMessagesWaiting(tx_queue)) { CAN_Tx(p_frame); return 0; } return xQueueSend( tx_queue, p_frame, 10/portTICK_PERIOD_MS ); } Original CAN_write_frame is renamed to CAN_Tx. In ...
by jcsbanks
Mon Jun 18, 2018 8:59 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

That would be very nasty, it is going very fast now with 100% CAN bus loads over many millions of frames whilst running WiFI without errors. My peak load will be about 50% in actual use.
by jcsbanks
Mon Jun 18, 2018 8:44 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

Really good idea to send from CAN Tx interrupt, will try that, thanks. I was sending a wake up from the interrupt to a task and getting undesirable latency. Latency massively affects throughput in my application, CAN bus is by far my only bottleneck. If a CAN packet is 0.25ms, I want a response on t...
by jcsbanks
Sun Jun 17, 2018 9:36 pm
Forum: Hardware
Topic: About the CAN controller.
Replies: 174
Views: 116117

Re: About the CAN controller.

I have a dramatic performance improvement to share that reduces latency between receiving a frame and transmitting a response from around several milliseconds down to <80us (most of the time <10us which is the resolution with which my Kvaser CAN device can measure). It doesn't do too much in the CAN...
by jcsbanks
Wed Jun 06, 2018 2:02 pm
Forum: ESP32 IDF
Topic: esp_wifi_connect() does not yield to other tasks?
Replies: 5
Views: 2040

Re: esp_wifi_connect() does not yield to other tasks?

Thanks ESP_Sprite. Very helpful, will investigate along these lines.

Yes I do use floats in the RMT task that normally runs every 5ms.

The RMT task can be starved for at least 400ms depending on frequency.

If one core is writing to flash, can the other core still run normally?
by jcsbanks
Tue Jun 05, 2018 5:15 pm
Forum: ESP32 IDF
Topic: Separate user code from system code to decrease ota binary size
Replies: 9
Views: 3218

Re: Separate user code from system code to decrease ota binary size

Interesting. Do you also pass parameters to the functions?

Go to advanced search