I created this Atmel Studio 7 project by importing an arduino project.
Then I added some C libraries from another project (andy's LCD).
I removed the init function from main since I want to control the timers differently.
My program begins with the following code:
Serial.begin(115200);
Serial.println("TPUART2 Test");
knx.begin(Serial2, P_ADDR(1, 1, 1); //This is the imported libray, a knx arduino project.
If I remove the third line then the program executes, although not normally. First the "TP" is printed in the serial port and after about a second, the program runs normaly.
When I include the third line, the knx.begin function, then the program crashes before returning from knx.begin.
More specifically, here are the first lines of knx.begin:
Serial.println("here 1\n");
_tpuart = new KnxTpUart(serial ,physicalAddr, NORMAL);
Serial.println("here 2\n");
The "here 1" string is always outputed.
The "here 2" string is nover outputed.
Inside the KnxTpUart function, I print a string just before the function returns and it is outputed!!
So, the problem occurs when returning from this function somehow, I have no idea.
Do you think it has something to do with this being a C++ function??
Any ideas?
Thanks,
Bill.