PPS mapping can be used only once on PIC24FJ16GA002

General discussion on mikroPascal PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
erkileitaru
Posts: 28
Joined: 29 Dec 2009 08:53

PPS mapping can be used only once on PIC24FJ16GA002

#1 Post by erkileitaru » 03 Mar 2019 12:48

Hi. It seems that PPS mapping can be used only once.

I have following two pins:
PPS_Mapping(0, _OUTPUT, _U1TX);
PPS_Mapping(4, _INPUT, _INT1);

Depending on which line comes first, I get either working INT1 or Uart tx, but not both.

Played also with the IOLOCK one-way bit but no help.

Any ideas?

EDIT:
Got it working like this, but still it seems like a bug that oneway config bit does not work as intended.

Unlock_IOLOCK();
PPS_Mapping_NoLock(4, _INPUT, _INT1);
PPS_Mapping_NoLock(0, _OUTPUT, _U1TX);
PPS_Mapping_NoLock(1, _INPUT, _U1RX);
Lock_IOLOCK();

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PPS mapping can be used only once on PIC24FJ16GA002

#2 Post by stefan.filipovic » 04 Mar 2019 12:29

Hi,

Did you disable IOLOCK protection bit in the Edit Project settings?

Kind regards,
Stefan Filipović

erkileitaru
Posts: 28
Joined: 29 Dec 2009 08:53

Re: PPS mapping can be used only once on PIC24FJ16GA002

#3 Post by erkileitaru » 04 Mar 2019 16:57

Yes i tried it both ways

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: PPS mapping can be used only once on PIC24FJ16GA002

#4 Post by stefan.filipovic » 04 Mar 2019 18:10

Hi,

Unfortunately, I do not have this MCU to test it, but it sounds like the IOL1WAY bit from the CW2: FLASH CONFIGURATION WORD 2 register has set to 1.
When you load the hex file in the mikroProg Suite, there is a config bit "IOLOCK Bit One-Way Set Enable Bit", how has this bit set in both cases?

This bit should be set as "The OSCCON <IOLOCK> bit can be set and cleared as needed".

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroPascal PRO for dsPIC30/33 and PIC24 General”