I am using the FXTH870912DT1 and by default the PTA4 pin is supposed to work as an input. In my code, Background mode is disabled, and I read the PTA4 pin and it does not read HIGH even though I have forced it HIGH through an external MCU's GPIO.
The PTA4 pin has been also externally pulled HIGH to VDD using a 4.7 kOhm resistor. I have also measured the voltage at PTA4 pin using a multimeter and it is reading 3.25V.
So what am I doing wrong here?
Thanks
Tushar
Solved! Go to Solution.
Hi Tushar,
I have contacted an application engineer for an advice. For his answer please see the description.
I apologize for confusion and inconvenience.
DESCRIPTION
PTA4 pin has two functions: BKGD and GPIO output-only. PTA4 cannot be used as GPIO input. I see that the FXTH8709xx datasheet indicates that the pin is input-only, and this is an error. It has been corrected it the datasheets/manuals of the other part numbers, but not this one apparently. Sorry for the confusion.
With Best Regards,
Jozef
Dear Tushar,
could you please state from which register are you trying to read it in the PTA4? Is it from the PTADD register?
With Best Regards,
Jozef
Hi Jozef
I am trying to read from the PTAD register, Bit 4.
Regards,
Tushar
Dear Tushar,
there shouldn't be a problem to read the Bit 4 high in the PTAD register if there is 3.25V on the PTA4 pin. Could you please double check how is the Bit 1 BKGDPE set in the SIMOPT1 register?
Could you please check the VDD voltage? The high voltage on the PTA4 pin should be minimally 0.7*VDD.
With Best Regards,
Jozef
Hi Jozef
Just to be doubly sure, I explicitly made the BKGDPE bit to 0.
SIMOPT1 = (SIMOPT1 | SIMOPT1_STOPE_MASK | SIMOPT1_COPE_MASK ) & (UINT8)(~((UINT8) (SIMOPT1_COPCLKS))) & (UINT8)(~((UINT8)(SIMOPT1_BKGDPE_MASK)));
Still, it doesn't work.
Regards,
Tushar
Hi Tushar,
I have contacted an application engineer for an advice. For his answer please see the description.
I apologize for confusion and inconvenience.
DESCRIPTION
PTA4 pin has two functions: BKGD and GPIO output-only. PTA4 cannot be used as GPIO input. I see that the FXTH8709xx datasheet indicates that the pin is input-only, and this is an error. It has been corrected it the datasheets/manuals of the other part numbers, but not this one apparently. Sorry for the confusion.
With Best Regards,
Jozef
Thanks for the clarification Jozef.
Tushar