This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM3S9B92 CAN device issues

Other Parts Discussed in Thread: LM3S2110

Dear Sir,
         I design a evaluation board using LM3S9B92IQC80C3, which is almost the same as ek-lm3s9b92. The minor difference is that PB4, PB5 are used as CAN pins. When I debug the can_fifo example, the routine can not enter into the CANIntHandler(), I cannot find the reason.
By the way, the routine of can_device_fifo has been running in the CAN device evaluation board based on LM3S2110IQC25A2.
         Then, I load the program into IDM_SBC_RDK(LM3S9B92IQC80B1), and the routine can enter into the CANIntHandler(),  but stopped waiting for all bytes go out for ever. The the circuits for the CAN node are the same, why the results are different?
Is there any program fit for LM3S9B92 How Can I make the CAN controller of a LM3S9B92IQC80C3 work correctly ?
        The can_fifo and can_device_fifo files are as follows:

0407.can_fifo(lm3s9b92).rar

6232.can_device_fifo(lm3s2110).rar

        Any suggestions will be appreciated!


   
Regards,
Michael Lee.

  • One suggestion is to check your hardware.  Do you have a schematic of your CAN circuit?

    The reason I say this is that in order to work properly, a CAN controller usually has to see itself on the network (i.e. receive itself when transmitting).  Otherwise it thinks the bus is in contention and has issues.  Therefore I would check to see if you have a CAN driver chip (something like http://focus.ti.com/docs/prod/folders/print/sn65hvd1050.html) and a terminating resistor.  If you have already got those in place then it is likely to do with your code.

    Tim

  • Tim King said:

    One suggestion is to check your hardware.  Do you have a schematic of your CAN circuit?

    The reason I say this is that in order to work properly, a CAN controller usually has to see itself on the network (i.e. receive itself when transmitting).  Otherwise it thinks the bus is in contention and has issues.  Therefore I would check to see if you have a CAN driver chip (something like http://focus.ti.com/docs/prod/folders/print/sn65hvd1050.html) and a terminating resistor.  If you have already got those in place then it is likely to do with your code.

    Tim

    Thank you for your suggestions.

    The schematics of CAN circuit based on lm3s2110 and lm3s9b92 are as follows:

    lm3s2110 CAN

    lm3s9b92 CAN

    The terminator resistors are populated, and D3, D4 are not populated.

     

  •          In order to find the problem, I load the can_device_fifo program into lm3s9b92 evaluation board, and  load can_fifo program into lm3s2110 evaluation board. Then, I run the can_device_fifo firstly, and debug the can_fifo routine on lm3s2110, I find the routine can enter into the CANIntHandler(), and I can measure square signal on CANH pin of sn65hvd1050d. Howerer, the routine stopped waiting for all bytes go out for ever.

    The debug results can say that the CAN module of lm3s2110 board do transmitter the information, but the lm3s9b92 board do not receive the whole message.

    Is that right? The reason should be thath lm3s9b92 CAN module does not work properly!

    The code of can_device_fifo is attatched.

    4454.can_device_fifo(9b92).rar

    How can I debug the lm3s9b92 CAN module?

     

    Any suggestions will be appreciated!


       
    Best Regards,
    Michael Lee

  • Dear King,

    Thank you very much for your suggestions.

    I have solved the problem.

    In the can_fifo, can_device_fifo programs shipped with ek-lm3s8962, only two intructions are used to configure CAN 0 pins, but when to lm3s9b92, it should use four instructions to configure CAN0 pins. The instructions are as follows:

    ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

    GPIOPinConfigure(GPIO_PB4_CAN0RX);
    GPIOPinConfigure(GPIO_PB5_CAN0TX);

    ROM_GPIOPinTypeCAN(GPIO_PORTB_BASE, GPIO_PIN_4 | GPIO_PIN_5);

     

    I don't know why the programs shipped with ek-lm3s8962 do not need the two instructions in the configuration of CAN 0 pins?

     

    Best regards,

    Michael Lee