Processor expert components for GPIO and Delay

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Processor expert components for GPIO and Delay

1,219 Views
fasihahmed
Contributor IV

Hey,

I would like some help in setting up GPIOC pin as high and low with a delay in between.

I am using MC56F84763 DSC with my own hardware and to check if the code is working, i would like to toggle pin and read it through oscilloscope via my hardware

.

I have taken a sample example project from Processor Expert -> Init_SCI project . And have disabled the main loop code of SCI.

I need some guidance how to use the Processor expert to add and configure components for GPIO and Delay from library.

So i can enable GPIO pin as high and low.

ZhangJenniexiangjun.rong

0 Kudos
2 Replies

1,084 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Fasih,

Unfortunately, the Processor Expert(PE) is a GUI tools, we have not the User Manual or Guidance for the PE tools.

But for the task to toggle a GPIO, this is the procedure, for example you want to toggle GPIOB_1 bit:

1)Enable GPIO gated clock, you can set the corresponding bit in SIM_PCE0 register.

SIM_PCE0|=1<<6; //enable GPIOA clock

2)clear the corresponding bit in GPIOx_PER register so that GPIO controls the pad.

GPIOB_PER&=~(0x02);

3)set the corresponding bit in GPIOx_DDR register so that the pad is configured as GPIO OUTPUT mode:

GPIOB_DDR|=0x02;

3)you can set the pin as 1 by Setting the GPIOx_DR:

GPIOB_DR|=0x02;

4)clear the pin by clearing the GPIOx_DR

GPIOB_DR&=~(0x02);

Hope it can help you

BR

XiangJun Rong

0 Kudos

1,084 Views
fasihahmed
Contributor IV

Can you show this as a video tutorial?xiangjun.rong

0 Kudos