Hey guys,
I was wondering whether anyone knows what kind of Initialization FreeMASTER performs on MC9S08MP16 to make it send and receive data through the TX and RX test pins.
I have a USB 2.0 to Serial RS232 TTL UART Converter Module Adapter (CP2102 based) connected to it and I can't get any data out of it or send anything into it unless FreeMASTER starts running. After that everything works as expected.
Has anyone accomplished doing so without FreeMASTER? If so, How did you accomplish that?
Could you also point me to any piece of code that turns those two pins on on said board?
Thank you very much.
Hi Abhishek,
I suppose you have installed the FreeMASTER tool on your PC. So the best way how to properly set-up and use FM tool is to follow the steps described in the AN4752 - FreeMASTER Usage.pdf on web:
Best Regards,
Stano.
Thanks for the reply Stanislav,
Actually I have interfaced FreeMaster with my board which is connected to BLDC motor and it has been working properly But instead of FreeMaster I want to communicated with Mc9s08mp16 through UART. So that I can get the status of my motor as well as send data to it for controlling it.
Hope that I have made it clear to you.
Hi Abhishek
I am not sure if you are asking for the SCI configuration. If this is the case you can use
void main(void)
{
// Following a reset, BUSCLK = 4MHz
SCIBD = 26; // SCI baud rate = 4MHz/(16*26)=9615 bps
SCIC1 = 0; //default settings
//enable transmitter and receiver pins, enables receiver interrupt
SCIC2 = SCIC2_TE_MASK | SCIC2_RE_MASK | SCIC2_RIE_MASK;
EnableInterrupts;
for (;;)
{
__RESET_WATCHDOG();
}
}
/***************************************************************************************/
interrupt VectorNumber_Vscirx void SCIRX_ISR(void)
{
(void) SCIS1; // read SCIS1 register for clear RDRE flag
u8receiver = SCID;
SCID = u8receiver;
}
I hope this will help you