Hello, All I am using rl-arm , have problem when using mmc in RTX-OS in a task . when i debuge with j-link i see MMC task was be in hard loop in SPI_SAM7X.c in below line
-------------------------------SPI_SAM7X.c------------------------------------- static BOOL SendBuf (U8 *buf, U32 sz) { /* Send buffer to SPI interface. */ U32 i;
for (i = 0; i < sz; i++) { AT91C_BASE_SPI0->SPI_TDR = buf[i]; /* Wait if Tx FIFO is full. */ while (!(AT91C_BASE_SPI0->SPI_SR & AT91C_SPI_TDRE)); AT91C_BASE_SPI0->SPI_RDR; } hard loop-----> while (!(AT91C_BASE_SPI0->SPI_SR & AT91C_SPI_RDRF));//os_tsk_pass(); AT91C_BASE_SPI0->SPI_RDR; return (__TRUE); } -------------------------------------------------------------------------------
and task program is in below:
__task void phaseB (void) { char count,errorflag; os_dly_wait(200); count = 3; while (finit(NULL) != 0) { os_dly_wait(2); if (!(count--)) { errorflag = 1; break;
} } if (errorflag==1)debug_send("MMC Error\n"); while(1){ os_dly_wait(100); debug_send("MMC Task\n");
}
Please help meeeeeeeeeeeeeeeeeeeeeeeeeeeeeee King regard Amir
Hello do you work with RTX-OS and MMC? please help me. regard Amir
Hello guy's
Solvedddddddddddddddddddddddddddddddddddddddddddddddddddddd hura hura only need to select Thumb mode in target option (k)(k)(k)(k)(k)(k)(k)(k)(k)(k)(k)(k)(k)(k)(k)(k) have good time Amir