2018-09-03 08:39 AM
Hi,
I am using an STM32f429 Discovery board with CubeMX and HAL, and have some problems regarding SPI. I am using an DAC which takes data in 24 bit format, 8 control bits and 16 data.
when declared as Var[]={1,2,3} is actually {1 3 2} where 3 is transmitted as 85.
Please can someone advise?
Thanks
2018-09-07 03:32 PM
if you look carefully at the nSS pin in the datasheet of the DAC you will see is not 8 or 16 bit aligned, but message aligned.
I am not sure HAL can work with that.
2018-09-10 08:48 AM
I've managed to fix the last two problems. My only issue now is how to switch between 8 and 16 bit mode on the fly? Could someone please advise?
I'm not sure what you mean about nSS pin won't work - afaik hardware nSS in HAL isn't working anyway - is this what you meant? So I was going to soft toggle it myself.