There seems to be an issue with USB Serial in the beta version of the compiler.
If I compile the following code with the current compiler I get "Connected to mBed..." out of the USB port.
If I compile it with the beta compiler I get nothing out of the USB port. Well, there might be something coming out but it is not at 230400 baud.
<code snip>
#include "mbed.h"
#include "CAN.h"
#define TRUE 1
#define FALSE 0
DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);
DigitalOut led4(LED4);
// Setup CAN1 Controller, MSCAN 125K
CAN can1(p9, p10);
// Setup CAN2 Controller, HSCAN 500K
CAN can2(p30, p29);
// Setup USB Serial Port
Serial pc(USBTX, USBRX); // tx, rx
int main()
{
char MessageFoundCAN1;
char MessageFoundCAN2;
int TimeStampCAN1;
int TimeStampCAN2;
CANMessage CAN1_MsgRx; // Message reception on CAN1
CANMessage CAN2_MsgRx; // Message reception on CAN2
Timer FreeRunningTimer; //Free running timer for CAN message stamp
// USB Serail Port baud rate
pc.baud(230400);
// CAN1, MSCAN, 125kbit/s
can1.frequency(125000);
// CAN2, HSCAN, 500kbit/s
can2.frequency(500000);
/****** Program Starts Here *******/
pc.printf("Connected to mBed...\n\r");
Hi,
There is a new beta version of the mbed compiler available.
A quick summary of the changes:
Any and all feedback is welcome!
Dan