2015-10-04 03:58 AM
Guys,
How can I control SPI1 hardware NSS output (PA4) ? I tried to give a signal to it, but nothing on my logic analyzer...#define Mp3SelectControl() { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4 , 0 ); }
#define Mp3DeselectControl() { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4 , 1 ); }
.
.
.
Mp3SelectControl();
HAL_Delay(10);
Mp3DeselectControl();
HAL_Delay(10);
Any clues ? thanks
2015-10-04 06:46 AM
The most obvious places to look would be how the pin is configured, and if there's anything externally that's impacting it.
2015-10-04 07:35 AM
It worked after I was not using NSS as hardware, but use it as a GPIO....
Is it possible as CS pin with this configuration? thanks Logic analyzer capture :http://i129.photobucket.com/albums/p231/picture_77/logic%20analyzer%20VS1053%204_zps82ptkcm1.jpg
2015-10-04 08:02 AM
Not sure I understand what the question is.
The HW NSS is problematic because it never quite does what the attached device wants.With GPIO you should be able to explicitly control it, just not very tightly to the SPI peripheral.2015-10-05 07:35 AM
So better use PA4 as GPIO output for CS, don't you think ?
2015-10-05 08:03 AM
I think it's the easiest route to get the waveform you want, doesn't have to be that specific GPIO