hla
Junior Member
Posts: 29
|
Post by hla on Jan 9, 2020 11:36:05 GMT -8
Hi, I'm writing an application that constantly updates a display with voltage values and graphs. It runs on a Teensy 3.2. The hardware has a FT811 based display and a DAC connected to the same SPI but with different select pins.
Initially I communicated with the DAC as part of the loop where the display is updated. This worked as long as I used the .__end() and .resume() before and after the code that communicates with the DAC. The DAC SPI driver is "protected" by using beginTransaction() and endTransaction().
I'm now changing the code to do the DAC communication based on periodic interrupts. This causes problems with the display "crashes" randomly.
My theory is that the GDlib is not designed for this. Looking at the code it seems that the SPI communication is not "protected" by beginTransaction and endTransaction for each command. Is that correct ? If so, is there any way I can update the code to "support" this ? I've tried to update wiring.h with beginTransaction in __start and __wstart. And endTransaction in __end. That seems to solve the problem but I feel it's a bit of a hack.
Am I missing something, or could it be that the library is not designed to "support" this ?
|
|