How to use PinMux to generate CC3200 GPIO port usage file

GPIO port basic information

port Pin Signal name Remarks
Button SW2 15 GPIO22 Low level is not pressed 0
Button SW3 04 GPIO13 Same as above
LED D5 02 GPIO11 0 off 1 on
LED D6 01 GPIO10 Same as above
LED D7 64 GPIO09 Same as above

Because you want to use buttons to control the LED, you need to configure the ports corresponding to these devices. In order to save the port location of CC3200, one port corresponds to 7 or 8 modes. Manual configuration is very troublesome. At this time, we need to use the official software PinMux to help us.

  1. Open PinMux, select Device as CC3200
    Insert picture description here
  2. Click the plus sign of GPIO under "Available Peripherals" and click the box in front of GPIO Signals to deselect all signals;
    Insert picture description here
  3. Click "GPIO22" and "GPIO13", these two correspond to buttons, select these two as input "Input" pins; select GPIO9-11 as output "Output" pins, and these three correspond to LEDs.
  4. Download the corresponding file to the desktop;
    Insert picture description here
    Insert picture description here
  5. Renamed pin_mux_config.c to pinmux.c is mainly to facilitate the replacement of the original file, without having to modify the references in other places.
    The Pinmux.h file is the same. Drag the rom_pin_mux_config.c file directly into the blinky folder, as shown in the figure below.
    Insert picture description here
  1. Change the header files cited in the pinmux.c and rom_pin_mux_config.c files to pinmux.h;
    Insert picture description here
  2. In this way, you can develop your own code on the basis of the water lamp project. Generally, our development projects will be modified in the sample project provided by the SDK, instead of creating a new file from a blank, so that we can reference the already defined functions, such as turning off the LED function, lighting up the LED function, etc.

Guess you like

Origin blog.csdn.net/wuwenbin12/article/details/109340773