Because in flow code I have to put FPLLODIV divided by 2 to have a correct delay, with a CPU at 80 MHz.
Let me start by saying that it works correctly in mplab, am I doing something wrong in the configuration in flowcode?
Because it doesn't respect the delay
-
- Posts: 31
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 17, 2020 3:34 pm
- Been thanked: 1 time
Because it doesn't respect the delay
- Attachments
-
- 1can.png (237.28 KiB) Viewed 2382 times
-
- cantemp575.fcfx
- (25.1 KiB) Downloaded 147 times
-
- Valued Contributor
- Posts: 1281
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 312 times
- Been thanked: 452 times
Re: Because it doesn't respect the delay
Hi
Can't download your file until later in the day, but it sounds as though it could be a setting in configuration.
You will see a setting for:-
Speed (delay related timings)
This tells FC what speed your clock is running at so it can calculate the appropriate delays.
If this doesn't match your actual clock speed then issues arise.
It's the first thing I would check.
Regards
Can't download your file until later in the day, but it sounds as though it could be a setting in configuration.
You will see a setting for:-
Speed (delay related timings)
This tells FC what speed your clock is running at so it can calculate the appropriate delays.
If this doesn't match your actual clock speed then issues arise.
It's the first thing I would check.
Regards
-
- Posts: 31
- Joined: Thu Dec 17, 2020 3:34 pm
- Been thanked: 1 time
Re: Because it doesn't respect the delay
I correctly entered the clock speed of 80mhz, it seems that it works at 160, but obviously it is not possible, surely there are some employees who don't work for me,
the project is here
https://drive.google.com/drive/folders/ ... drive_link
the project is here
https://drive.google.com/drive/folders/ ... drive_link
-
- Posts: 31
- Joined: Thu Dec 17, 2020 3:34 pm
- Been thanked: 1 time
Re: Because it doesn't respect the delay
I'm going crazy to understand but nothing to do if I insert code made with mpla and working correctly, it also works in flowcode,
but if I only insert flowcode init the controller crashes, I would like to buy flowcode 10 but I doubt it would solve this problem.
I attach example photos, the project is always the same
https://drive.google.com/drive/folders/ ... drive_link
but if I only insert flowcode init the controller crashes, I would like to buy flowcode 10 but I doubt it would solve this problem.
I attach example photos, the project is always the same
https://drive.google.com/drive/folders/ ... drive_link
- Attachments
-
- 2can.png (215.48 KiB) Viewed 2377 times
-
- Posts: 31
- Joined: Thu Dec 17, 2020 3:34 pm
- Been thanked: 1 time
Re: Because it doesn't respect the delay
This is the simple project working tx can with rx can, I still have to understand why it doesn't want to work with flocode init, I'm waiting for someone expert to answer me.
Thank you
Thank you
- Attachments
-
- cantemp575.fcfx
- (24.71 KiB) Downloaded 147 times
-
- Matrix Staff
- Posts: 1882
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 484 times
- Been thanked: 661 times
Re: Because it doesn't respect the delay
Hello,
The only blocking code I can spot in the CAN initialise for the PIC32 is here,
You could double check if this is causing the problem by commenting out the while
The code can be found here C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\PIC32BIT
Copy and paste the path into your file explorer and then open the file PIC32BIT_CAL_CAN.c in a text editor.
The code in question can be found on line 296.
The only blocking code I can spot in the CAN initialise for the PIC32 is here,
Code: Select all
// Set to operating (normal) mode
C1CONbits.REQOP = REQOP_NORMAL;
while(C1CONbits.OPMOD != REQOP_NORMAL);
Code: Select all
// Set to operating (normal) mode
C1CONbits.REQOP = REQOP_NORMAL;
//while(C1CONbits.OPMOD != REQOP_NORMAL);
Copy and paste the path into your file explorer and then open the file PIC32BIT_CAL_CAN.c in a text editor.
The code in question can be found on line 296.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 31
- Joined: Thu Dec 17, 2020 3:34 pm
- Been thanked: 1 time
Re: Because it doesn't respect the delay
Hi, I commented on the indicated line, actually the microcontroller does not block but continues, the only thing it transmits and receives.