2021-12-12 11:03 PM
I'm using STM32L4Q5CGUX on my project.
I found some gpio errors.
When I write on PB9, it's written on PB8.
And I can't write on PB11.
Could you guys check together, please?
Solved! Go to Solution.
2021-12-21 01:04 AM
What _precisely_ is the entire part code on your device?
This is very important as it could explain the behaviour you are seeing.
I have had a quick look at the data-sheet, DS12902 Rev 3, and I find the comparison between figures 10 and 11 quite telling:
Figure 10 is the pin-out for stm32l4q5cxxx
Figure 11 is the pin-out for stm32l4q5cxxxP which is the version which allows you to use an external switch-mode power-supply to power the core of the processor for lowest-possible power consumption.
The difference?
Pin 22 is Vdd12 not PB11
Pin 45 is PB9 not PB8
Pin 46 is Vdd12
That seems to match the problems you are seeing. I guess in times of parts-shortage it is easy to order the wrong one. And maybe your supplier made the mistake not you.
Hope this helps,
Danish
2021-12-13 02:20 AM
Strip down your code to a minimal example showing the effect, test that and post it. Do you really think the chip is broken? Are you using some known-good board?
hth
KnarfB
2021-12-13 05:07 AM
Hello @Min-Kyoung Kim ,
I suggest you to start your own application using the latest release of CubeMX tool to initialize peripherals you need with the configuration you want.
Refer to the product datasheet to check the assignments for each pin.
You can try with other boards to confirm if the problem here seems related to the hardware or software environment.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Imen
2021-12-16 01:09 AM
Hi @Min-Kyoung Kim ,
Were you able to resolve the issue?
Please share your update and mark the reply as Best answer.
Thanks
Imen
2021-12-20 09:32 PM
Thank you for your kind comments.
However I couldn't resolve this problem.
Have you ever checked this port and pin of STM32L4Q5UX_UFQPFN48?
I mean port B and pin 8&9.
I have updated to CubeIDE version 1.8.0. and CubeMX 6.4.0.202111222105
It also was same.
PB9 is always written on 1.6V. I can't change at all.
And I can write on PB8 by writing on PB9.
I checked it by a oscilloscope.
I made simple example for this problem.
I attached my main code.
int main(void)
{
/* USER CODE BEGIN 1 */
uint32_t pre_count=0;
/* 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_USART1_UART_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
if(HAL_GetTick() >= pre_count+100)
{
pre_count = HAL_GetTick();
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_9); /* PB8 updating */
// HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_8); /* no working */
}
}
/* USER CODE END 3 */
}
2021-12-20 09:37 PM
Thank you for your kind comments.
I made simple example for this problem.
It happened same.
I checked other board and I checked hardware pin of STM32L4Q5UX directly by a oscilloscope.
Have you ever checked hardware pin of this board or used this board?
Didn't you have this kind problem?
If you could test this same board, could you check this port and pin?
2021-12-21 01:04 AM
What _precisely_ is the entire part code on your device?
This is very important as it could explain the behaviour you are seeing.
I have had a quick look at the data-sheet, DS12902 Rev 3, and I find the comparison between figures 10 and 11 quite telling:
Figure 10 is the pin-out for stm32l4q5cxxx
Figure 11 is the pin-out for stm32l4q5cxxxP which is the version which allows you to use an external switch-mode power-supply to power the core of the processor for lowest-possible power consumption.
The difference?
Pin 22 is Vdd12 not PB11
Pin 45 is PB9 not PB8
Pin 46 is Vdd12
That seems to match the problems you are seeing. I guess in times of parts-shortage it is easy to order the wrong one. And maybe your supplier made the mistake not you.
Hope this helps,
Danish
2021-12-21 07:48 PM
YES! That's right. It was stm32l4q5cxxxP. OMG....
I didn't know about that at all....
Thank you for reminding me.
2021-12-21 09:42 PM
Can I ask one more thing?
I set the code like below.
When I set ADC clock to Synchronous clock mode divided by 4, the board not working.
But when I get ADC clock to Asynchronous clock mode divided by 4, the board working.
I absolutely set clock configuration again after changing ADC clock mode.