I'm putting together a CAN demo with the mbed and a TI CAN transceiver. I'm not able to receive CAN frames on the PC CAN protocol analyzer. As an intermediate step, I'm trying to probe the td and rd pins (p29 and p30) on the mbed board. I'm not seeing any output from the td pin even though it would appear I should see a few transmissions before the error threshold is reached.
Does anyone know what the CAN td pin output should look like on a scope?
Here's the program I'm running: cantest2 and I've listed it below.
Thanks,
Richard
#include "mbed.h"
Ticker ticker;
DigitalOut led1(LED1);
CAN can1(p30, p29);
Serial pc(USBTX, USBRX); // tx, rx
char counter = 0;
void send() {
static char counter = 0;
if (can1.write(CANMessage(0x200, &counter, 1))) {
printf("CanTx--> id: 0x200 dlc: 1 data: %x\n\r", counter);
led1 = !led1;
counter++;
}
}
int main() {
pc.printf("\nCAN Test\n");
//250kbit/s
can1.frequency(250000);
// every 500ms
ticker.attach(&send, 0.5);
while (1);
}
I'm putting together a CAN demo with the mbed and a TI CAN transceiver. I'm not able to receive CAN frames on the PC CAN protocol analyzer. As an intermediate step, I'm trying to probe the td and rd pins (p29 and p30) on the mbed board. I'm not seeing any output from the td pin even though it would appear I should see a few transmissions before the error threshold is reached.
Does anyone know what the CAN td pin output should look like on a scope?
Here's the program I'm running: cantest2 and I've listed it below.
Thanks,
Richard