cancel
Showing results for 
Search instead for 
Did you mean: 

Clicker2 Clock Config (Newbie Errors I'm Sure)

CoachTacamo
Associate III

Greetings, 

I have purchased a Clicker2 from MikroElectronica mainly because it has the facility to host their Click Boards ecosystem while working with the STM32CubeIDE. I can't say that I am a fan of their abstracted SDKs and code that is too dissimilar to that of HAL and so on. The issue I am having is with the clock configurations.

The Clicker2 features a 25 Mhz Oscillator that I am certain is for the HSE and also features a 32.768 KHz oscillator that I am certain was meant for the LSE. Leaving all the specs as factory as possible (using the the internal oscillators) in CubeIDE I can get code to work as expected. However, I would like to set the MCU at 168 Mhz (not sure that makes any difference yet).

As an expeirment, I used the 168 Mhz settings in the native MikroElectronica IDEs (which seems to set HSI instead of HSE) and it all works. But they do a really good jobs of abstraction and therefore I can not ascertain how they set it all up.

Here's my attempted settings in the CubeIDE:

I2C2: I2C (Facilitates the MikroBus 2 position)

I2C3: I2C (Facilitates the MikroBus 1 position) (Conflicts with RCC MCO1 on PA8 when enabled)

RCC HSE: Crystal/Ceramic Resonator

RCC LSE: Crystal/Ceramic Resonator

RCC MCO1: Checked

RCC MCO2: Checked

CoachTacamo_0-1690301098868.png

No matter what I do, I am missing something and I can't get it to run on 168 MHz as it does in the native MikroElectronica IDEs. I have tried bypassing HSE, Using HSI instead at /16 all to no avail. Would anyone be willing to guide me to a solution?

 

Cheers,

 

 

13 REPLIES 13
AScha.3
Chief III

hi,

how you test the core speed ? what its doing with your clocktree in pic , should run 168M ?

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

Hello

First of all, try without MCO1 / 2 enabled, since with quick look doens't make sense to drive clock these empty lines.

Have you debug it thru SWD etc or how you know its running or not ?

Br J.T

 

I don't have a programmer yet. Currently loading Hex files and using a HID Bootloader to upload code. So I can't tell if its running. I tried without MCO1 MCO2 enabled and it has no effect.

@JTP1 

 
JTP1
Lead

Ok, but the led is not blinking in PE12 with 168MHz ? and lower freq -> led blinks ?

Can you share also your ioc file ?

 

I would love to do so. But the system is saying the .ioc files are not allowed. Maybe my account is too new for that?

JTP1
Lead

You can make rar- package, it is allowed file format. Or change file extension to .txt, i guess its also allowed.

 
JTP1
Lead

Hello

Try to comment out MX_SDIO_SD_Init(); or remove it from CubeMx. Does it affect to your problem ? It seem to end up to error handler if SD card not present.

Br J.T