AnsweredAssumed Answered

How do I configure GPIO (PTBx) as an output?

Question asked by Mihir Rajput on Sep 18, 2019
Latest reply on Sep 24, 2019 by Wolfgang Bihlmayr

Hello. I am using MM9Z1_638D1 for a project.

How should I correctly configure a GPIO (PTB3) as an output and drive it?

 

Current implementation:

B_GPIO_CTL = (B_GPIO_CTL_PE3M_MASK | B_GPIO_CTL_DIR3M_MASK); // enable mask
B_GPIO_CTL |= (B_GPIO_CTL_PE3_MASK | B_GPIO_CTL_DIR3_MASK); // enable

B_GPIO_PUC_PUE3 = 1; // pull up enable
B_GPIO_OUT3 = 1; // turning on

 

B_GPIO_OUT3 = 0; // turning off

 

Is my understanding correct?

Am I missing something?

I don't see any voltage on that pin.

Outcomes