Blockset described on this wiki is deprecated since 2012.

For Model Based Design (MBD), use the free MPLAB Device Blocks for Simulink, tool from Microchip.
Updated Rapid Control Prototyping (RCP) custom projects are published at:

Pic32-gcc v1.04 bugfix

From - Simulink device driver Blockset for dsPIC / PIC24 / PIC32 Microcontrollers --[[User:LubinKerhuel|LubinKerhuel]] 12:40, 3 September 2009 (UTC)
Jump to navigation Jump to search

Bug reported on the Microchip .h definition file.

  • In the file int.h localised in \MPLAB C32\pic32mx\include\peripheral\int.h,

  • Lines (411, 424, 437, 450, 463) replace

  • Line 705, replace
#define mOC1SetIntPriority(priority)        (IPC1CLR = _IPC1_OC1IP_POSITION, IPC1SET = ((priority) << _IPC1_OC1IP_MASK))


#define mOC1SetIntPriority(priority)        (IPC1CLR = _IPC1_OC1IP_MASK, IPC1SET = ((priority) << _IPC1_OC1IP_POSITION))
  • Line 746, replace
#define mOC4SetIntSubPriority(subPriority)  (IPC4CLR = _IPC4_OC4IS_MASK, IPC4SET = ((subPriority) << v))


#define mOC4SetIntSubPriority(subPriority)  (IPC4CLR = _IPC4_OC4IS_MASK, IPC4SET = ((subPriority) << _IPC4_OCIS_POSITION))

Thanks to Jiri Sehnal from Humusoft for identifying theses bugs.