Hello, I have started working on ac30m1x64 micro-controller. I have successfully interfaced GSM/GPRS module serially(I2C) and getting acknowledgements for all the AT Commands. I have migrated the same code on CMSIS-RTX(RTOS),but, I cannot see any acknowledgements from the GSM/GPRS(slave) module. I have used RTOS TIMER, osDELAY()function and many more for trial and error. Though failed to get reply from the slave. I cannot even see the "AT= OK" from the slave, I am completely stuck. Please can anyone help me through this?
Thanks,
I have copied a part of the program which I am sending to the module. ///////////////////////////////////////////////////////////////////////////////////////// case GSM_STATE_POWERON_WAIT_00: g_stGSMWaitTimer = TMR_SetDelayVal(GSM_POWERON_WAIT0_MSEC); GSMState = GSM_STATE_POWERON_WAIT_1; #if defined(ENABLE_GSM_NOTIFICATION) StSetText(StNoRange, "GSM_STATE_POWERON_WAIT_00"); StDraw(StNoRange); #endif break;
case GSM_STATE_POWERON_WAIT_1: if(TMR_IsTimerExpired(g_stGSMWaitTimer))//wait for 1000ms { M66_PWRKEY_OFF; g_stGSMWaitTimer = TMR_SetDelayVal(GSM_POWERON_WAIT2_MSEC); GSMState = GSM_STATE_POWERON_WAIT_2; #if defined(ENABLE_GSM_NOTIFICATION) StSetText(StNoRange, "GSM_STATE_POWERON_WAIT_1"); StDraw(StNoRange); #endif } break;
case GSM_STATE_POWERON_WAIT_2: if(TMR_IsTimerExpired(g_stGSMWaitTimer))//wait for 1500ms in reset state { M66_PWRKEY_ON; g_stGSMWaitTimer = TMR_SetDelayVal(GSM_POWERON_WAIT3_MSEC); //3000 GSMState = GSM_STATE_SET_AUTOBAUD; #if defined(ENABLE_GSM_NOTIFICATION) StSetText(StNoRange, "GSM_STATE_POWERON_WAIT_2"); StDraw(StNoRange); #endif } break;
case GSM_STATE_SET_AUTOBAUD: UARTSend(U0,(uint8_t *)ATCMD_AUTOBAUD, sizeof(ATCMD_AUTOBAUD)); while (len == 0) { len = UARTReceive((UART_Type *)U0, &Master_Buf_UART0[0], sizeof(Master_Buf_UART0)); } #if defined(ENABLE_GSM_NOTIFICATION) StSetText(StNoRange, "I am in GSM_STATE_SET_AUTOBAUD"); StDraw(StNoRange); #endif if(CmpareStrOnly(Master_Buf_UART0,AT_RESPONSE_ATOK,3) == 1) {
GPIO_SetValue(PD,_BIT(0)); GSMState = GSM_STATE_SET_FIXBAUD; } else GSMState = GSM_STATE_SET_AUTOBAUD; break; /////////////////////////////////////////////////////////////////////////////////////////
First three cases that are GSM_STATE_POWERON_WAIT_00:, GSM_STATE_POWERON_WAIT_1:, GSM_STATE_POWERON_WAIT_2: which are working perfect and helping the module to Power ON. Then, you can see the "case GSM_STATE_SET_AUTOBAUD:", this program I cannot make it work when I migrated program to RTOS platform, but it works perfect without RTOS.
I am using the Keil-RTX(CMSIS-RTOS).
You're not listening, are you?
Please read my previous post again.
There is no point in looking at the code before you have demonstrated what is actually going on between the module & your microcontroller.
And, before posting source code, pay attention to the instructions for posting source code! Look at the picture: www.danlhenry.com/.../keil_code.png - is it not clear?
So Sorry... I will be aware from now. Thanks.