Page 1 of 1

PIC24FJ256GA406 UART Rx Interrupts not working

Posted: Tue Jun 05, 2018 9:32 pm
by leoo
Hi,

I'm using FC7.3.0.6. to program a PCB that utilizes a PIC24FJ256GA406. I use UARTs 1, 2, 3, 5 and 6 and need the Rx Interrupts on each UART.

On a loopback test, UARTs 1, 2 and 3 trigger their Rx interrupts when a character is received, but UARTs 5 and 6 don't, although they do transmit characters.

I rechecked the hardware and it seems to be OK and the datasheet shows that the chip can handle Rx interrupts on all 6 UARTs.
Could this possibly be a problem with the PIC24FJ256GA406.fcdx file?

Kind regards.
Leo

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Posted: Wed Jun 06, 2018 4:58 pm
by Benj
Hi Leo,

The device datasheet is very unclear as to the exact PIR and PIE registers for the RXINT flags. Therefore I have got the correct locations from the compiler header file. However the header file could be wrong and would explain why you don't get compile errors but it doesn't work.

I've just combed through the FCD and had another pass through the CAL file. I'll try and see if I can find a better data sheet for the device with a full register set as this would help to confirm things are actually correct.

Edit they are listed in the datasheet, you just have to go hunting for them (Table 8-2 starting on page 115). It looks like what we have is correct. Hmm. I'll keep digging and see if I can find what might be causing this.

Maybe try this latest CAL file for v7 to see if it helps with the problem at all. Simply copy the file to your "Flowcode 7\CAL\PIC16BIT" directory.
PIC16BIT_CAL_UART.c
(25.33 KiB) Downloaded 283 times

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Posted: Thu Jun 07, 2018 8:33 am
by leoo
Hi Ben,

I've used the new CAL file and channel 5 now works the same as channels 1 through 3. I unfortunately can't test channel 6 just yet, due to the set up of my PCB, but will let you know if I have any problems.

Thanks for the fix.

Kind regards.
Leo

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Posted: Mon Jun 18, 2018 10:36 pm
by MOCUELSL
Can I use this file in V8?
regards

Re: PIC24FJ256GA406 UART Rx Interrupts not working

Posted: Wed Jun 20, 2018 12:53 pm
by Benj
Can I use this file in V8?
No the fix has already been applied to v8, use the Help -> Check for updates menu in v8 to get the fix.