2024-05-15 05:56 PM
Hello,
I'd like to change speed (clock prescaler setting in CFG1) and then resume sending bytes on SPI.
Right now, I do :
retval = HAL_SPI_Abort(&hspi2);
My_SPI2_Init(SPI_EyeGenPrescaler);
where My_SPI2_Init is just slightly customized version of Mx_SPI2_Init with new Prescaler value as input argument.
After this, I don't see anything on SPI MOSI output.
What am I doing wrong? Is something else needed to shutdown SPI and initialize it at new prescaler value ?
Can I somehow change speed more fine-grained than just changing prescaler to values like powers of 2 ?
Thanks,
regards.
Solved! Go to Solution.
2024-05-16 02:48 PM
Hello,
thanks for response... It seems that I've forgot to start new send after reinitialization. Now it works...
Regards.
2024-05-16 01:08 AM
Hello @bully
Could you please deinitialize the SPI before reinitializing it and check the result?
2024-05-16 02:48 PM
Hello,
thanks for response... It seems that I've forgot to start new send after reinitialization. Now it works...
Regards.