Hello,
I am using Arduino IDE to run STM32F103. I need to change clock and data rise/fall times speeds.
I see STM32CUBEIDE has option to select output speed as HIGH/MEDIUM /LOW., but I am not much familier with ARDUINO IDE, so how to change these parameter.
All I know is that SPI frequency is usually a n^2 division of the master clock,
so for a common Uno R3 with 16MHz clock it could be 8, 4, 2, 1 etc. MHz.
The default being 4MHz.
If you enter a random value as SPI frequency, then it drops down to the next lower division.
Say you enter 20MHZ for that Uno R3, then it AFAIK sets it to 8MHz.
I see 72MHz master clock speeds for that processor.
I expect the default SPI frequency would then be 18MHz.
Put a scope on it to make sure.
Leo..
Dear Wawa,
I think you misunderstood me. I don't need to change clock speed. I need to change clock rise/fall time.
Rise/fall times of a fast digital signal are usually slowed down by wiring (capacitance).
I don't see why you intentionally want to cripple a digital signal.
Leo..
Interesting question. I tried to investigate but didn't get very far.
I'm working on an STM32F4 "blackpill" based project so I dug into the build folder but while I can find the object files where the pin configurations would be set, I can't find e.g., the gpio.c file that it would originate from. I think you'll have to find the STM32 library source and edit it there.
Why are you changing pin speeds? Is there an EMI issue?
[edit]
Looks like it may be in the
C:\Users\$USER\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\variants\Generic_F401Cx folder, but I didn't check closely enough to verify.
TBH though, if I'm working on something where this is a concern, I'm probably not going to be running it with arduino libraries!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
