• AVR Freaks

Disabling peripheral modules to use pin as gpio

Author
shmak
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/05/01 08:38:19
  • Location: 0
  • Status: offline
2019/09/17 16:56:38 (permalink)
0

Disabling peripheral modules to use pin as gpio

Seems like I had to disable the PWM module to get a gpio pin to function as a digital output pin.
For example, disabling PWM4 seemed to allow me to use gpio RA7 
TCK/RPA7/PWM10H/PWM4L/PMPD5/RA7
 
Why does it not work without disabling PWM4?
What is the proper way to know I have configured my gpio correctly?
 
#1

2 Replies Related Threads

    ric
    Super Member
    • Total Posts : 23893
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Disabling peripheral modules to use pin as gpio 2019/09/17 16:59:22 (permalink)
    0
    Which PIC32 device?
    Most peripherals should be disabled after a power on reset. Are you sure you didn't have some other code active which enabled it?
    Is this using MCC or Harmony?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    shmak
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2019/05/01 08:38:19
    • Location: 0
    • Status: offline
    Re: Disabling peripheral modules to use pin as gpio 2019/09/17 17:09:54 (permalink)
    0
    1. PIC32MKxxxxMC064
    2. In the PIC32MK General Purpose and Motor Control (GP/MC) Family Data Sheet > TABLE 32-2: PERIPHERAL MODULE DISABLE REGISTER SUMMARY, it seems to suggests the peripheral modules are enabled by default.
    3. There may be some code that was generated by MCC but now I am using harmony
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5