App pin usage

How do you use PB7/PWM4.2/APP pin?

All special pins except RESET and Vbat can be used as GPIO or peripheral pins, however it is up to you to make sure your use of these pins does not interfere with their use as special pins if needed.

The APP pin is used to prevent the application from running. The APP pin is checked shortly after startup and reset. When the APP pin is high your application will run normally. If the APP pin is low when the bootloader is finished, the bootloader will not transfer execution to your application. There is no need for an external pull up on the APP pin as it is pulled high by an internal pull up.

so trying to wire up a mosfet to the PWM4.2, what is the proper way of doing this considering all of the above?

Add a pull up resistor

Where?

Screenshot 2020-11-12 134132

Your design has a pull down resistor. You can’t use this circuit on the app pin. Use a different circuit or use a different pin.

If i remove both resistors, it also does not work.

Correct, you need to add a pull up on the pin like I suggested in the first post.

1 Like