2008-08-20 03:27 AM
2011-05-17 12:55 AM
hi Matt
That is done in the SSP_DeInit(); routine. Even with that, i just cant write to those, and after trying, when i leave that routine, the processor just crash... :-S If it helps, i'm using FreeRTOS, and an IAR evaluation Board. Every else work except that :-S Thanks for the tip2011-05-17 12:55 AM
Hi everyone
I'm using ST 91x_SSP lib, and port5.x to work with SSP0 to an SD card. When i'm debbuging code, and pass the SSP0->CR0, CR1 and etc, and try to write to them, they just don't change their values! Does anyone know what m i doing wrong, please? :o here is my initialization code: SCU_APBPeriphClockConfig(__SSP0, ENABLE ); SSP_DeInit(SSP0); SSP_StructInit(&SSP_InitStructure); SSP_InitStructure.SSP_FrameFormat = SSP_FrameFormat_Motorola; SSP_InitStructure.SSP_Mode = SSP_Mode_Master; SSP_InitStructure.SSP_CPOL = SSP_CPOL_High; SSP_InitStructure.SSP_CPHA = SSP_CPHA_2Edge; SSP_InitStructure.SSP_DataSize = SSP_DataSize_8b; SSP_InitStructure.SSP_ClockRate = 5; SSP_InitStructure.SSP_ClockPrescaler = 2; SSP_Init(SSP0, &SSP_InitStructure); SSP_Cmd(SSP0, ENABLE); THANKS :|2011-05-17 12:55 AM
You must release the SSP peripheral (and any other peripherals you want to change register values for) from reset before writing to the other registers. After you enable the APB periph clock, add this line:
SCU_APBPeriphReset(__SSP0, DISABLE); //Take Port out of Reset That should allow you to change register values for the SSP0. Matt