Other Parts Discussed in Thread: HALCOGEN
The customer intends to use N2HET as ordinary IO pins since the GIO pins of the customer's 4357 chip are almost all occupied and the IO pins left as input are not easy for wire welding. But he encountered following problems during configuration:
1. The customer intends to configure the N2HET2 pin as an IO input, pull it down, and there is no open-drain. Once the high voltage of the external input is detected, it will be operated.
2. The chip package used by the customer is TMS5704357BZWTQQ1R, the physical pin is "D3", and the corresponding PINMUX function is "N2HET2[12]/MIBSPI2NENA". The customer found "Control of Multiplexed Inputs" in the function selection of "I/O Multiplexing and Control Module (IOMM)" in the data sheet, then found "PINMMR97[0]" and set it as an input. Please see the picture below for details.
pinMuxReg->PINMUX[97] = SIGNAL_N2HET2_12_D3 | SIGNAL_N2HET2_13_D2 | SIGNAL_N2HET2_14_D1 | SIGNAL_N2HET2_15_K4; // n2het2[12]
3. Then the customer used the HALCON tool to configure N2HET2[12] in the register of N2HET2, and generated the following code:
hetREG2->GCR = ( 0x00000001U | (uint32)((uint32)1U << 24U)| (uint32)((uint32)1U << 16U)| (0x00020000U)); hetREG2->INTENAC = 0xFFFFFFFFU; hetREG2->INTENAS = 0x00000000U; hetREG2->PFR = (uint32)((uint32) 6U << 8U)| ((uint32) 0U); // Enable/Disable Parity check hetREG2->PCR = (uint32) 0x00000005U; /** - Fill HET RAM with opcodes and Data */ (void)memcpy((void *)hetRAM2, (const void *)het2PROGRAM, sizeof(het2PROGRAM)); //Setup prescaler values hetREG2->PFR = (uint32)((uint32) 6U << 8U)| ((uint32) 0U); // Set the default value of pin hetREG2->DOUT = (U32)((U32)0U << FORCED_UPDATE_PIN); // Set the N2HET2[3] pin as input hetREG2->DIR = (U32)((U32)0U << FORCED_UPDATE_PIN); // Enable the pull up/down. hetREG2->PULDIS = (U32)((U32)0U << FORCED_UPDATE_PIN); // Enable the pull down. hetREG2->PSL = (U32)((U32)0U << FORCED_UPDATE_PIN); //hetREG2->HRSH = (U32)((U32)1U << FORCED_UPDATE_PIN); //Set HET pins open drain enable hetREG2->PDR = (uint32) 0x00000000U; // Check the pin if high then update. if ((hetREG2->DIN & (0x1 << FORCED_UPDATE_PIN) ) == 1) { CPUUPDATE=1; }
N2HET part of the code is generated by HALCON, and the pinmux part is also modified according to HALCON. After completing the above settings, the customer inputs 3.3V to the D3 pin, but there is no effect in fact. The customer would like to know if any part is missing or wrong?
Best Regards,
Cherry Zhou