Hello all,
I am new to nxp' microcontroller. and for my project i am using MK20DX128VLL7.
and i have to do UART communication with GSM module.
Software information : KDSK 3.2 + pE
I have enabled interrupt as well, as i want call back function specially for receiver. but could not find anywhere.
As my knowledge there is EVENT.c file for interrupt, an there are function as well. but i have not seen any ISR handler. i think there has to be PE_ ISR() like something.
And there has to be fsl_uart_irq.c file as well. but i think pE +KDSK 3.2 does not support it .
Basically i want something like callback function where i can receive one by one character. does there any function in ASerialLLD1.c file or anywhere else ?
Please try to give me full sequence from which function should i use for uart to call back funtion.
And also i was not able to download SDK file for my micro-controller, because there is not SDK available for.
I have downloaded SDK2.0 for MK20DX128xxx10. but might not be help full.
And SDK file project does not support pE for component initialization.
So i want to work with SDK2.0, how can i add component in it and initialize them.
Please reply as soon as possible.
Thanks,
Reena Patel
Solved! Go to Solution.
Hi Reena,
First please select Interrupt service/event.
After generate code, you can see the uart interrupt routine PE_ISR(ASerialLdd1_Interrupt) in ASerialLdd1.c. Trace into this function, you'll see it call some functions in Events.c, like AS1_OnRxChar, AS1_OnTxChar, etc.. You can write your code here. They are the real callback function.
Regards,
Jing
Hi Reena,
First please select Interrupt service/event.
After generate code, you can see the uart interrupt routine PE_ISR(ASerialLdd1_Interrupt) in ASerialLdd1.c. Trace into this function, you'll see it call some functions in Events.c, like AS1_OnRxChar, AS1_OnTxChar, etc.. You can write your code here. They are the real callback function.
Regards,
Jing
Hello sir...
Thank you for your reply, it helps me. right now from main, i send the AT command and in event.c file i am receiving one byte from onblocksent() and next all byte i have received from onBlockReceived() by byte by byte with setting timer.
Now i want to ask you, can i use this function from event.c to main ? like in stm microcontroller there are callback function which user can use in any file. do we have same in kinetis?
or i can use interrupt function from event.c directly into my any file as, but it will be wrong, please help me for that.
I have one more question what is the diffrence between these two component : 1) asyncroserial and 2) serial_LDD
and for timer i have used TimerUnit_LDD (PIT_ CVAL0). is these hardware timer ? which maybe not stop the process of microcontroller other activity.
Please reply asap.
Thanks & Regards
Reena Patel
Hi Reena,
Sorry for reply you late.
You can call ASerialLdd1_OnBlockSent() and ASerialLdd1_OnBlockReceived() in main. The head file has been include in main.c. But you can't move interrupt service code or those callback code. They are generate by PE. When PE generate code, there will be problem.
AsynchroSerial is at high level. It call functions in serial_LDD. Init_xxx and xxx_PDD is at bottom level. They are called by xxx_LDD.
PIT is hardware timer. Details please find in reference manual chapter 38.
Regards,
Jing
Hello all,
If possible please response to the my above post.