Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 19, 2024, 09:36:02 09:36


Login with username, password and session length


Pages: [1]
Print
Author Topic: Errors still present in int_1xx_2xx_legacy.h  (Read 4137 times)
0 Members and 1 Guest are viewing this topic.
Skarden
Newbie
*
Offline Offline

Posts: 31

Thank You
-Given: 19
-Receive: 26


« on: January 02, 2013, 12:59:45 12:59 »

Hello all,
I found some errors present into the file int_1xx_2xx_legacy.h in all the MPLAB 32 bits compilers versions.
Some have been corrected into the latest version of the compiler (the 1.20) but few are still present.

Basically the errors are the lines 34-35:

#ifndef _OLD_PIC32INT_5XX_6XX_7XX_HEADER_FILE
#define _OLD_PIC32INT_5XX_6XX_7XX_HEADER_FILE

that need to be changed in

#ifndef _OLD_PIC32INT_1XX_2XX_HEADER_FILE
#define _OLD_PIC32INT_1XX_2XX_HEADER_FILE



and the lines 694-697:

#define mCNSetIntPriority(priority)         (IPC6CLR = _IPC6_CNIP_MASK, IPC6SET = ((priority) << _IPC6_CNIP_POSITION))
#define mCNGetIntPriority()                 (IPC6bits.CNIP)
#define mCNSetIntSubPriority(subPriority)   (IPC6CLR = _IPC6_CNIS_MASK, IPC6SET = ((subPriority) << _IPC6_CNIS_POSITION))
#define mCNGetIntSubPriority()              (IPC6bits.CNIS)

that need to be changed in:

#define mCNSetIntPriority(priority)         (IPC8CLR = _IPC8_CNIP_MASK, IPC8SET = ((priority) << _IPC8_CNIP_POSITION))
#define mCNGetIntPriority()                 (IPC8bits.CNIP)
#define mCNSetIntSubPriority(subPriority)   (IPC8CLR = _IPC8_CNIS_MASK, IPC8SET = ((subPriority) << _IPC8_CNIS_POSITION))
#define mCNGetIntSubPriority()              (IPC8bits.CNIS)

I attached the corrected file; please replace the original present in the folder pic32mx\include\peripheral\legacy

Hoping this can help someone of you that "plays" with the 32MX150 or 32MX250 like me!
Regards
Logged
cranor
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 10
-Receive: 10


« Reply #1 on: February 04, 2013, 04:49:31 16:49 »

Hi,

UARTx defines are missing too.

For UART1, can't use ConfigIntUART1() without adding the following lines to the same file:


#ifdef _UART1
#define mU1EClearIntFlag()                  (IFS1CLR = _IFS1_U1EIF_MASK)
#define mU1EGetIntFlag()                    (IFS1bits.U1EIF)
#define mU1EGetIntEnable()                  (IEC1bits.U1EIE)
#define mU1EIntEnable(enable)               (IEC1CLR = _IEC1_U1EIE_MASK, IEC1SET = ((enable) << _IEC1_U1EIE_POSITION))
/*********************************************************************
 * UART 1 Receive
 ********************************************************************/
#define mU1RXClearIntFlag()                 (IFS1CLR = _IFS1_U1RXIF_MASK)
#define mU1RXGetIntFlag()                   (IFS1bits.U1RXIF)
#define mU1RXGetIntEnable()                 (IEC1bits.U1RXIE)
#define mU1RXIntEnable(enable)               (IEC1CLR = _IEC1_U1RXIE_MASK, IEC1SET = ((enable) << _IEC1_U1RXIE_POSITION))
/*********************************************************************
 * UART 1 Transfer
 ********************************************************************/
#define mU1TXClearIntFlag()                 (IFS1CLR = _IFS1_U1TXIF_MASK)
#define mU1TXGetIntFlag()                   (IFS1bits.U1TXIF)
#define mU1TXGetIntEnable()                 (IEC1bits.U1TXIE)
#define mU1TXIntEnable(enable)               (IEC1CLR = _IEC1_U1TXIE_MASK, IEC1SET = ((enable) << _IEC1_U1TXIE_POSITION))
/*********************************************************************
 * UART 1 Vector
 ********************************************************************/
#define mU1ClearAllIntFlags()               ( IFS1CLR = (_IFS1_U1EIF_MASK | _IFS1_U1RXIF_MASK | _IFS1_U1TXIF_MASK ))
#define mU1IntDisable()                     ( IEC1CLR = (_IEC1_U1EIE_MASK | _IEC1_U1RXIE_MASK | _IEC1_U1TXIE_MASK ))
#define mU1SetIntEnable(flags)             ( IEC1SET = ((flags)<<_IEC1_U1EIE_POSITION) )
#define mU1SetIntPriority(priority)         ( IPC8CLR = _IPC8_U1IP_MASK, IPC8SET = ((priority) << _IPC8_U1IP_POSITION))
#define mU1GetIntPriority()                 (IPC8bits.U1IP)
#define mU1SetIntSubPriority(subPriority)   ( IPC8CLR = _IPC8_U1IS_MASK, IPC8SET = ((subPriority) << _IPC8_U1IS_POSITION))
#define mU1GetIntSubPriority()              (IPC8bits.U1IS)
#endif

Logged
Skarden
Newbie
*
Offline Offline

Posts: 31

Thank You
-Given: 19
-Receive: 26


« Reply #2 on: February 26, 2013, 10:22:06 10:22 »

Hello,
I included the definitions for the UART1 (cranor dixit), the UART2 and the SPI2.

Regards
Logged
Gallymimu
Hero Member
*****
Offline Offline

Posts: 704

Thank You
-Given: 151
-Receive: 214


« Reply #3 on: February 26, 2013, 01:10:40 13:10 »

Please create a support ticket with microchip if you haven't.  They really like to get this feedback and use it to correct things.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC