We are working on K64FN1 (Mask 1N83J) and MQX 4.1 with Windows 7 x64 and Codewarrior Development Studio 6.4
We are using a AsyncroSerial associate with a SerialLDD. 38400,n,8,1. UART0 and UART3 and the problem it’s that generate error interrupt (Noise flag),
The problem it’s when we receive data UART3 the microcontroller generate an error interrupt, with flag Noise, when the input signal in the pin it’s clear. Then lost serial byte.
There are moment that we receive 64 byte correct, but another with a 5 byte frame lost the 2 last bytes. First generate a noise error flag and the overrun and losts bytes.
We read the Mask Set Errata for MASK 1N83J and indicate on errata ID 7028 that it’s posible that generate a noise error flag but under ISO-7816 that we don’t use.
Are there any solution for this problem?
Hello Joan,
Are you using the TWR-K64F120M?
Could you please check in the init_gpio.c file the below code:
case 3:
pctl = (PORT_MemMapPtr)PORTC_BASE_PTR;
if (flags & IO_PERIPHERAL_PIN_MUX_ENABLE)
{
/* PTC16 as RX function (Alt.3) + drive strength */
pctl->PCR[16] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
/* PTC17 as TX function (Alt.3) + drive strength */
pctl->PCR[17] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
}
if (flags & IO_PERIPHERAL_CLOCK_ENABLE)
{
/* start SGI clock */
sim->SCGC4 |= SIM_SCGC4_UART3_MASK;
}
if (flags & IO_PERIPHERAL_CLOCK_DISABLE)
{
/* stop SGI clock */
sim->SCGC4 &= (~ SIM_SCGC4_UART3_MASK);
}
break;
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I use a owner bsp but it's similar to TWR-K64F1120M, yes I have the same code you indicate.