cancel
Showing results for 
Search instead for 
Did you mean: 

SSP0

ricardo2399
Associate II
Posted on August 20, 2008 at 12:27

SSP0

3 REPLIES 3
ricardo2399
Associate II
Posted on May 17, 2011 at 09:55

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 tip

ricardo2399
Associate II
Posted on May 17, 2011 at 09:55

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 :|

matthew239955_stm1
Associate II
Posted on May 17, 2011 at 09:55

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