cancel
Showing results for 
Search instead for 
Did you mean: 

pa12,pa11 of l072cz-lrwan is not working.

SYun.2
Associate III

Development board: L072CZ-LRWAN board

Development Environment: KEIL (Free License)

Hello

We are currently developing LoRaWAN's end device.

Before connecting JP9 1-2 to control TCXO,

I tried to check if the output is coming from PA12, but only the voltage of mV is detected.

0693W00000Bb626QAB.jpgNo matter how much you look at the circuit diagram, the only connection to PA12 is SB13 that is disconnected from JP12(PIN1).

I gave all the settings of GPIO to HIGH, but I checked that all except PA12, PA11 PB13.

I'd appreciate it if you could tell me what I did wrong!

Below is the code.

void MX_GPIO_Init(void)

{

 GPIO_InitTypeDef GPIO_InitStruct = {0};

 /* GPIO Ports Clock Enable */

 __HAL_RCC_GPIOB_CLK_ENABLE();

 __HAL_RCC_GPIOA_CLK_ENABLE();

 __HAL_RCC_GPIOH_CLK_ENABLE();

 /*Configure GPIO pin Output Level */

 HAL_GPIO_WritePin(GPIOB, LED_G_Pin|LED_B_Pin|LED_R2_Pin, GPIO_PIN_RESET);

 /*Configure GPIO pin Output Level */

 HAL_GPIO_WritePin(GPIOA, TCXO_VCC_Pin|LED_R1_Pin, GPIO_PIN_RESET);

 /*Configure GPIO pins : PBPin PBPin PBPin */

 GPIO_InitStruct.Pin = LED_G_Pin|LED_B_Pin|LED_R2_Pin;

 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStruct.Pull = GPIO_NOPULL;

 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

//**//

GPIO_InitStruct.Pin = GPIO_PIN_All;

 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStruct.Pull = GPIO_NOPULL;

 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

 /*Configure GPIO pins : PAPin PAPin */

 GPIO_InitStruct.Pin = TCXO_VCC_Pin|LED_R1_Pin;

 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

 GPIO_InitStruct.Pull = GPIO_NOPULL;

 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

 /*Configure GPIO pin : PtPin */

 GPIO_InitStruct.Pin = push_Pin;

 GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;

 GPIO_InitStruct.Pull = GPIO_NOPULL;

 HAL_GPIO_Init(push_GPIO_Port, &GPIO_InitStruct);

 /* EXTI interrupt init*/

 HAL_NVIC_SetPriority(EXTI0_1_IRQn, 0, 0);

 HAL_NVIC_EnableIRQ(EXTI0_1_IRQn);

}

int main(void)

{

 /* USER CODE BEGIN 1 */

 /* USER CODE END 1 */

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */

 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */

 SystemClock_Config();

 /* USER CODE BEGIN SysInit */

 /* USER CODE END SysInit */

 /* Initialize all configured peripherals */

 MX_GPIO_Init();

 MX_RTC_Init();

 MX_USART2_UART_Init();

 /* USER CODE BEGIN 2 */

HAL_GPIO_WritePin(TCXO_VCC_GPIO_Port,GPIO_PIN_All,GPIO_PIN_SET);

HAL_GPIO_WritePin(GPIOB,GPIO_PIN_All,GPIO_PIN_SET);

 /* USER CODE END 2 */

 /* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

  /* USER CODE END WHILE */

  /* USER CODE BEGIN 3 */

 /* USER CODE END 3 */

}

PS: I disconnected STLINK by removing SB37 to get the minimum current flowing on the development board.

In addition, SB6, SB14, SB17, SB18, SB19.

1 ACCEPTED SOLUTION

Accepted Solutions
SYun.2
Associate III

I solved it.

I'm writing it down just in case there's someone like me who's doing it.

Please connect JP2.

If you leave the jumper open, PA12 seems to be bitten by GND.

View solution in original post

1 REPLY 1
SYun.2
Associate III

I solved it.

I'm writing it down just in case there's someone like me who's doing it.

Please connect JP2.

If you leave the jumper open, PA12 seems to be bitten by GND.