This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Software reset failure with setting PD3 pin as Analog IN feature with internal Pull up

Part Number: TM4C123GH6PM

Tool/software:

Hi, We have recently met a TivaTm TM4C123GH6PM SW reset issue described below

Procedure

1. Set pin#64 (PD3) Analog function (AIN4) with enabling internal Pull up.

2. Execute software System Reset Request by setting "SYSRESREQ"   which is bit2 of Application Interrupt and Reset Control (APINT) register.

Result:

We found that the whole system will be rebooting failure and all GPIOs are stock in reset state.

Setting PD3 with GPIO function and excute SW reset can have MCU reset successfully.

Could you help check the reason??

Thanks

Jason

  • 1. Set pin#64 (PD3) Analog function (AIN4) with enabling internal Pull up.

    Hi Jason,

      If you are using PD3 as an ADC input for AIN4 then why are you enabling the internal pull up? You only enable internal pull to either up or down when you are in GPIO mode, not when it is configured as an analog input. 

      Please use SysCtlReset to generate system reset. You can't just write to bit2 of APINT register. You need to also write the proper key to 31:16. The SysCtlReset will take care of it. 

  • Hi Charles,

    Thanks for your replying.

    Is there any restriction that no Internal PU/PD can be set with ADC function?  Since I can still set ADC with internal PU without any warning message, the only problem I met is SW reset failure. So I just curious the relationship between the SW reset failure and ADC with PU setting.  I don't see any information from datasheet of the restriction, could you please share more information about this??

    Let me describe the symptom more preciously.    The SW reset is actually executed (I can see the GPIO PIN state is reset to its default state). But the MCU is stocked in reset status and the system is not boot up successfully.   And the reproduced failure rate is 100%.

    Thanks 

  • Is there any restriction that no Internal PU/PD can be set with ADC function?  Since I can still set ADC with internal PU without any warning message, the only problem I met is SW reset failure. So I just curious the relationship between the SW reset failure and ADC with PU setting.  I don't see any information from datasheet of the restriction, could you please share more information about this??

    Hi Jason,

      If you remove the pull up configuration, do you see the same issue? Please refer to example at C:\ti\TivaWare_C_Series-2.2.0.295\examples\peripherals\adc\single_ended.c on how to configure ADC. 

    Let me describe the symptom more preciously.    The SW reset is actually executed (I can see the GPIO PIN state is reset to its default state). But the MCU is stocked in reset status and the system is not boot up successfully.   And the reproduced failure rate is 100%.

    What do you mean the MCU is stuck at reset? If you use the debugger to examine the processor, where does it halt?

  • Hi Charles

    1. The MCU Stuck at reset means when we execute the SW Reset by setting APINT register with VECTKEY = 0x05FA, SYSRESREQ = 1, the MCU is reseted (All GPIOs are back to its reset status).  But, MCU will be kept (Stuck) in reset state and will NOT jump out the reset.

    We found the issue by checking another GPIO PA1 configuration. We PA1 = output high and after above reset process, PA1 will be kept as reset status and can not be configured (Code not running??)

    2. If we reset the MCU with PD3=ADC "WITHOUT" pull up, no such failure can be reproduced.

    Thanks

  • But, MCU will be kept (Stuck) in reset state and will NOT jump out the reset.

    I'm still not clear what you mean the MCU is stuck at reset. If you use debugger, at what line of code is the MCU stuck? Can you take a screenshot at which line of code the processor is stuck at?

    PA1 will be kept as reset status and can not be configured (Code not running??)

    Code not running does not mean it is stuck at reset. The processor may have run some code but before it set PA1 high, it may have crashed or having a exception fault or other reasons. But this does not mean it is stuck at reset. 

    2. If we reset the MCU with PD3=ADC "WITHOUT" pull up, no such failure can be reproduced.

    Although I can't explain why adding a pullup on a ADC pin will create the failure, there is absolutely no reason in my opinion to add a pullup on an analog pin.