Clicker2 Clock Config (Newbie Errors I'm Sure)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 09:07 AM
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
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,
- Labels:
-
I2C
-
RCC
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 09:37 AM
hi,
how you test the core speed ? what its doing with your clocktree in pic , should run 168M ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 09:38 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 09:42 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 09:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 10:14 AM
Ok, but the led is not blinking in PE12 with 168MHz ? and lower freq -> led blinks ?
Can you share also your ioc file ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 10:39 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 11:11 AM
You can make rar- package, it is allowed file format. Or change file extension to .txt, i guess its also allowed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 12:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-25 11:20 PM
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