2018-10-02 02:44 AM
Hello
Is there a possibility to reduce the time gap between two consecutive SPI Frames? Background: I would like to use only the MOSI signal without the clock to send information to some addressable LED (WS2812). They just measure the time between rising and falling edge of the signal to determine the data. With gaps between the frames, the timing of the MOSI signal is destroyed for a MOSI without Clock usage.
I have the following Setup:
In the main programm I have a uint8_t array with values to send over SPI.
uint8_t DataToSend[]={0xBB,0xBB,0xBB,0xBB,0x88,0x88,0x88,0x88,0xBB,0x88,0x88,0x88,0x88,0,0,0,0,0,0};
In the main loop, I call the following functions:
HAL_SPI_Transmit_DMA(&hspi1,DataToSend,sizeof(DataToSend));
HAL_Delay(1000);
With an attached scope, I can measure that the data is transmitted.
But between two blocks of 16 bits, there is a time gap of about 660ns (about two bit times) is there a possibility to reduce that gap close to zero so that no time space between the frames can be seen?
Attached you can find my minimal project. In Atollic TrueSTUDIO use File-->Import-->Existing Projects into Workspace and select the attached zip file. In the zip file, you can find the oscilloscope screenshot as well.
Thank you for your help.
Marco
Solved! Go to Solution.
2018-10-03 02:34 PM
> hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
is what makes the spaces between frames.
JW
2018-10-03 02:34 PM
> hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
is what makes the spaces between frames.
JW
2018-10-04 01:19 AM
Thank you for your answer. This solved the issue.
Thanks a lot for your help.
Best, Marco
2018-10-04 05:20 AM
If resolved, please mark as so (Best). Thanks.
JW