Page 1 of 1

Bugs in interruptions and CAN ?

Posted: Fri Nov 04, 2011 3:04 pm
by r_romeo
Hi
I am new in flowcode and I am doing the example files implementing dspics and I have some problems:
1- the interruptions TMRx are not working in the simulator

2- the interruptions INTx also not working in the simulator

is this a problem with the FCD file like the one in
http://www.matrixmultimedia.com/mmforum ... ocb#p13464

3- I am implementing internal CAN file with a DSPic30f4012 and this ones do not have BRGCON registers, because this are 16 bit, the three registers (BRGCON1, BRGCON2, BRGCON3) are replaced for CICFG1 and CICFG2, but in the CAN initializer of flowcode just show me the BRGCON (??)

Am I doing something wrong?
I have the dspic professional installed in a windows 7 , 64 bits
normally I turn the watchdog timer off and CAN simulation is escential for me

Re: Bugs in interruptions and CAN ?

Posted: Wed Nov 09, 2011 6:35 pm
by r_romeo
Hi again
still no reply to my questions. The more important one is the CAN configuration, if not possible is there a custom code I can use?

Re: Bugs in interruptions and CAN ?

Posted: Wed Nov 09, 2011 7:08 pm
by Sean
Hello,

Unfortunately, interrupts do not simulate well in Flowcode V4. This problem is being addressed in V5.

The CAN component config register settings are displayed in 8-bit mode (as used by external CAN) in the component property page, but are combined in the C code to produce the correct values for 16-bit devices with internal CAN.

The following code is used by the component to generate the 16-bit register values:

C1CFG2 = CNF2_VAL | ( CNF3_VAL << 8 );
C1CFG1 = CNF1_VAL;

Re: Bugs in interruptions and CAN ?

Posted: Fri Nov 11, 2011 5:31 pm
by r_romeo
Thank you Sean, now the CAN bus is working in simulation!!