Fastspin question re clkset in propeller.h
pmrobert
Posts: 673
in Propeller 1
I've a P1 PropGCC project which I'm converting to Fastspin 3.9.25 C . Easy enough except I'm unable to find the macro reference "clkset" in propeller.h or indeed anywhere in the whole directory structure after grepping all files inthe tree. c.md references it as below:
Eric, your work is genius - thank you.
### P1 Clock Frequency In C code, the P1 clock frequency defaults to 80 MHz, assuming a 5 MHz crystal and `xtal1 + pll16x` clock mode. This is a common configuration. You may override it with the `clkset` macro from `<propeller.h>`, which works the same as the Spin `clkset` function.What or where am I missing?
Eric, your work is genius - thank you.
Comments
I'm not sure that clkset has ever worked correctly on P1. Does your P1 project use it?
It does; I was using it for one style board that used a 6.25 mHz crystal but have since moved on to using the Flip which is 5x16 so we're good there. The remaining use I had for clkset was to reboot the Prop. The project is a bullet speed chronograph and uses a PiZeroW and a Prop to communicate to a PC app via wifi as the chrono and sensors itself can be 50 or 100 yards away. I never really had the need to reboot, the Prop is just a very reliable, very accurate realtime beast. I've switched to Fastspin due to anticipating using P2 for a much enhanced version using a microphone array to detect target strike localization. Re the clkset, it's a "want" not a need, if you weren't planning on implementing it don't worry about for now. I'll give the builtin a shot (no pun intended) and if I have any difficulty the inline PASM would be super easy to implement in my code. Thanks for answering, I'll look at the fastspin source and see what's there. I'll report back in this thread.
Best regards, Mike R.
Mike R.
Cheers,
Eric