Example MPC5775K-UART_with_Interrupts S32DS_1.0

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Example MPC5775K-UART_with_Interrupts S32DS_1.0

Example MPC5775K-UART_with_Interrupts S32DS_1.0

********************************************************************************

* Detailed Description:

* Application performs basic initialization, setup PLL to maximum allowed freq.,

* setup clock for peripherals,

*

* LINFlex UART mode transmit and receive with interrupts

*

*

* ------------------------------------------------------------------------------

* Test HW:         MPC5775K-356DS, MPC57xx Motherboard

* MCU:             PPC5775KMMY3A 0N38M

* Terminal:        19200-8-no parity-1 stop bit-no flow control on LINFlexD_0

* Fsys:            PLL0 266MHz

*                    Z4 Core 133MHz

* Debugger:        Lauterbach Trace32

*                  PeMicro USB-ML-PPCNEXUS

* Target:          internal_FLASH (debug mode, release mode)

* EVB connection:  J14.2 to P12.6 Connect LINFlexD_0 RXD to main RS232

*                  J13.2 to P12.7 Connect LINFlexD_0 TXD to main RS232

*

********************************************************************************

ラベル(1)
添付
コメント

I am looking for a UART driver with Interrupt for MPC5748G micro but you have shared for MPC5775K.

Please provide the required project

My requirement: Transmit and receive 9 bytes of hex values as shown below.
TxBuffer[9] = {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19}


URGENT!!: Please provide an example code for the MPC5748G EVB board with Tx & Rx interrupt for my requirement.
This change will be used in our production program (FORD OEM).

Please provide the procedure to test your example code

Please review my Uart7_Rx_Isr code below:

void Uart7_Rx_Isr (void)
{
    unsigned char Channel = 7U;
    unsigned char Data;
 
    if (1 == LINFlexD_7.UARTSR.B.DRFRFE)
    {
        Data = LINFlexD_7.BDRM.B.DATA4;
 
        LINFlexD_7.UARTSR.R &= UART_DRFRFE;      /* Clear data reception flag W1C */
 
       /*Save received data*/
       if (BufferTxdisplay_index < UART_7_TX_MAX_LENGTH)   //0 <12
      {
           BufferTxdisplay[BufferTxdisplay_index] = Data;
 
           BufferTxdisplay_index++;
      }
 
     if( (BufferTxdisplay_index >= 9) )
     {
        BufferTxdisplay_index = 0;
     }
   }
}
 
I am attempting to read all 9 bytes using the above Rx ISR, but I am only receiving the first byte repeatedly, which is 0x11.
 
Expected Output:
TxBuffer[9] = {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
RxBuffer[9] = {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
 
Actual Output:
TxBuffer[9] = {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
RxBuffer[9] = {0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11};
 
Could you please suggest what the issue is in the RxISR routine?
 
Please provide the correct Uart7_Rx_Isr routine to read valid 9 bytes and Uart7_Tx_Isr and Transmit function as well.

Please provide the procedure to test your code

評価なし
バージョン履歴
最終更新日:
‎02-12-2016 06:19 AM
更新者: