cancel
Showing results for 
Search instead for 
Did you mean: 

Unusable STM32L01 MCU pins?

KevinZ
Associate II

Hello, all.

I'm trying to design and build my first STM32 project, a timer. I'm using the STM32L101K4 and have it configured as illustrated in the attached screenshot. The pins are configured in STM32CubeIDE as:

External LSE on 2 & 3

LCD connections on 7-13, 25-27. Pins 8 and 25 are PWM pins to control the LCD's backlight and contrast.

A rotary encoder and push-button switch on 19-21.

Some LEDs on 22, 28 & 29.

SWD on 23 & 24.

And, an unassigned GPIO pin on 30.

I also have configured:

System Core->RCC->LSE

System Core->SYS->Debug Serial Wire

Timers->TIM2->Channel 1 PWM Generation and Channel 3 PWM

All of these are configured without conflict, I think.

I'm puzzled now that I can't assign a role like GPIO_Output to unused pins, such as 6, 14, 15, 18 or 31. Assigning a role such as GPIO_Output (I didn't try other roles) generates a conflict in the configuration, with yellow triangles and magenta backgrounds.

Is it true that, because of the configuration I've chosen, these pins must remain unused? Can anyone explain why?

Second question, mostly unrelated to the main question of this post: What's the difference between 'pinned' pins (such as 13 or 19-22) and 'unpinned' pins (such as 9-12)? What does 'pinning' control?

As always, thanks for any advice or guidance. I really appreciate the expertise in this group.

-Kevin

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

That is saying you cannot enable Master Clock Output 1 because the pin is already used. It's not an error or something you need to fix.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

8 REPLIES 8
TDK
Guru

Can you attach your IOC file?

"Pinned" pins will not be automatically re-assigned to prevent a conflict.

> STM32L101K4

This chip doesn't exist. STM32L010K4Tx perhaps?

If you feel a post has answered your question, please click "Accept as Solution".
KevinZ
Associate II

Hi, @TDK, thanks for responding.

Where would I find a .ioc file? I see "KitchenTimer_L010K4.ioc" as a tab at the top of the window, and "KitchenTimer_L010K4.ioc" in the list of items under Project Explorer, but I can't find a file that starts with "KitchenTimer" using my file explorer (Linux Ubuntu 22.04).

Thanks for the 'pinned' explanation.

Yep, it's a STML010K4. Thanks.

-Kevin

If you open up a file explorer, it should be in the project directory, or a parent directory. Can also drag/drop from within CubeIDE to the desktop, perhaps. You can on Windows.

I wasn't able to duplicate the issue you're describing.

If you feel a post has answered your question, please click "Accept as Solution".
KevinZ
Associate II

Got it. Thanks! Attached.

-Kevin

Your IOC didn't show any errors when I opened it, and I'm able to assign unused pins as output without seeing any errors.

TDK_0-1704899855791.png

 

I am on an updated CubeMX version compared to you. I doubt that's the problem but it could be.

If you feel a post has answered your question, please click "Accept as Solution".
KevinZ
Associate II

This is what I see, if I try to map PA8:Screenshot from 2024-01-10 10-54-24.png

TDK
Guru

That is saying you cannot enable Master Clock Output 1 because the pin is already used. It's not an error or something you need to fix.

If you feel a post has answered your question, please click "Accept as Solution".
KevinZ
Associate II

@TDK, okay, thanks. I'll note that for the future.

-Kevin