Bugs in interruptions and CAN ?

Moderator: Benj

Post Reply
r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Has thanked: 14 times
Been thanked: 3 times
Contact:

Bugs in interruptions and CAN ?

Post 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

r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: Bugs in interruptions and CAN ?

Post 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?

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: Bugs in interruptions and CAN ?

Post 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;

r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: Bugs in interruptions and CAN ?

Post by r_romeo »

Thank you Sean, now the CAN bus is working in simulation!!

Post Reply