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.
Hello,
I am using two launchPads for CAN practice. I use the code from "C:\ti\C2000Ware_4_03_00_00\device_support\f2837xd\examples\cpu1\can_loopback_bitfields\cpu01\can_loopback_bitfields.c" to program it. The LED D1 is solid green, D9 solid red, D10 solid blue. The user's guide says: "If the sample is above mid-scale (2048), the blue LED D10 will illuminate. If the sample is below mid-scale, the red LED D9 will illuminate." So when both LEDs are illuminating, what does it mean? What is wrong with it? Does it show normal operation when D9 is red and D10 is off, otherwise?
Thanks,
Hongmei
Hongmei.
Are you able to connect to the Launchpad via CCS and run any C2000ware examples?
Hi Hongmei,
The LED functions described in the user guide apply to the out-of-box demo that runs on the launchpad the first time it is powered. LED9 and LED10 are user-programmable LEDs, hence if you load a program onto the launchpad (for example, the CAN one) the LED functions will be different. You can check what the meaning of these LEDs are by looking through the code and seeing where the GPIOs tied to the LEDs get toggled.
These are GPIO31 (also defined as DEVICE_GPIO_PIN_LED1) for D10 and GPIO34 (DEVICE_GPIO_PIN_LED2) for D9.
Regards,
Peter
To add to this, D1 is used to show that the 3.3V rail on the board is powered. Ideally this D1 LED should be illuminated for the entire duration of the board's operation.
Peter
yes. D1 is good, illuminating for the entire duration of the board's operation. But D9 and D10 also illuminate for the entire duration. I don't understand this. It should be wrong for D9, D10 illuminating all the time.
Hongmei,
D9 and D10 being illuminated doesn't necessarily mean that there is something wrong with the boards. These LEDs are actually designed in an active-low configuration, so when GPIO31 and GPIO34 are tied low, then the LEDs will be illuminated. I see that one of the CAN signals are configured to GPIO31 which is also connected to the LED. You most likely will want to change the GPIOs being used to the GPIOs connected to the CAN transceiver on the board
Regards,
Peter
Hi Peter,
I double checked this. If I use the original code which is for CANA (GPIO30, GPIO31), it works. I see the variables right in the expression window and D10 is off.
If I change the setting for CANA(GPIO30, GPIO31) to CANB (GPIO12, GPIO17), as well as the related CAN functions (CanaRegs->CanbRegs), it is not working and D9, D10 both are solid on. What else do I need to modify or any files I need to add to the project?
Thanks,
Hongmei
Hi Hongmei,
Like I mentioned previously, D9 and D10 are active-low LEDs so the reason you see D10 is off is because the connected GPIO (GPIO31) is toggling with the CAN communication. The reason you see that D9 and D10 are on when you change the CAN pins is because there is no longer any output on the LED GPIOs and thus they are on (active-low).
It is most likely something that is misconfigured in the software is the reason you are not seeing correct CAN output in the expression window. Hareesh Janakiraman could you provide insight into what should be changed for this example to move from CANA to CANB?
Regards,
Peter
Hongmei,
Please page 11 of www.ti.com/lit/SPRACE5, where I have clearly explained how to reconfigure the GPIO pins to be used for the CAN function.