FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2008 Threads] STR912 SPI portPosted by ricardo marinheiro on August 22, 2008 hi everyone
Does anyone already put SPI port of str912 working over FreeRTOS? I'm getting a crash when i try to use 91x_ssp libraries from ST.
Every hint are wellcome
Thank to all
RE: STR912 SPI portPosted by damien h on August 28, 2008 Hi,
Yes, i m using the SPI port under FreeRTOS, to access to a SD card, through EFSL lib, no problem, it's working
Here, my init code, if can help you : Regards.
Damien.
--------------------------------------------------------------- #define PULS_SD_CARD_SSP_PORTSSP0 #define PULS_SD_CARD_SPEED_INIT_KBITPERSEC380
u8 HAL_InitialiseSPP(void) { u8 SSP_ClockRate = 0; u8 SSP_ClockPrescaler= 0; SSP_InitTypeDef InitSSP;
/* disable the CS of the SD Card (should be already the case, but to be sure) */ HAL_DisableSDCardChipSelect ();
/* Add clock on SSP port */ if (PULS_SD_CARD_SSP_PORT == SSP0) { SCU_APBPeriphClockConfig (__SSP0, ENABLE); } if (PULS_SD_CARD_SSP_PORT == SSP1) { SCU_APBPeriphClockConfig (__SSP1, ENABLE); }
/* reset the SSP port */ SSP_StructInit (&InitSSP); SSP_DeInit (PULS_SD_CARD_SSP_PORT);
/* Configure the port */ InitSSP.SSP_FrameFormat = SSP_FrameFormat_Motorola; InitSSP.SSP_Mode= SSP_Mode_Master; InitSSP.SSP_CPOL= SSP_CPOL_Low; InitSSP.SSP_CPHA= SSP_CPHA_1Edge; InitSSP.SSP_DataSize= SSP_DataSize_8b; InitSSP.SSP_SlaveOutput= SSP_SlaveOutput_Disable; InitSSP.SSP_ClockRate= SSP_ClockRate; InitSSP.SSP_ClockPrescaler= SSP_ClockPrescaler;
HAL_SetSSPClockSpeed (PULS_SD_CARD_SPEED_INIT_KBITPERSEC);
/* Init and enable the SSP port */ SSP_Init (PULS_SD_CARD_SSP_PORT,&InitSSP); SSP_Cmd (PULS_SD_CARD_SSP_PORT,ENABLE);
return (0); }
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|