picnc to stm32f progress.

More
05 Sep 2020 23:26 - 05 Sep 2020 23:31 #180873 by mhel
'just wanted to post my progress on porting of picnc to stm32f4. (currently on a f407 but plan to use f405...because price :) )
https://streamable.com/k1ksfg
https://streamable.com/dl61rh

...and some query
I did a hack job with the spi
in the hal module, I'm using spidev
as it's the easiest to search on google
to find help.
I'm getting odd result if I commanded a 0 position.
I could issue a command greater than or less than 0,
e.g. -0.0005 0.0625 and it's ok, but with 0,
I get result like this:
ibb.co/fdyp0DP

Anyone uses/used the picnc and encounter(ed) the same?

I'm using the exact same code from picnc v2 (aka copy paste ;) )
except for the spi communication.

This is running on a tinkerboard, will try rpi3/4 whenever I get my hands on them.
Last edit: 05 Sep 2020 23:31 by mhel. Reason: Forgotten the actual question :)

Please Log in or Create an account to join the conversation.

More
03 Oct 2020 15:16 #184694 by twoflowers
Do you have the code somewhere? I have here a nucleo64 with 446RE what would like to be a test candidate.

Please Log in or Create an account to join the conversation.

More
03 Oct 2020 22:05 #184740 by mhel
Replied by mhel on topic picnc to stm32f progress.
I'm using this library github.com/andysworkshop/stm32plus
unfortunately it doesn't have support for the 446RE., because of older std pheriperal library.
I'm a C++ newbie but I find it a very good library with lots of examples.

Testing is on pause I got distracted trying to make GUI on a weston wayland, but I think I"m way over my head on that one, not enough skill.

If you are still interested let me know.

Please Log in or Create an account to join the conversation.

More
04 Oct 2020 09:04 #184788 by twoflowers
Still interested, but I'm wondering if it would not be easier to use the STM32 arduino core for migration.

Please Log in or Create an account to join the conversation.

More
04 Oct 2020 19:07 - 05 Oct 2020 13:33 #184865 by mhel
Replied by mhel on topic picnc to stm32f progress.
Whew, it took time to create the repo, but I learnt some git.
here it is, I hope you find it useful.
github.com/mhelmarc/stcnc

It would probably be easier with Arduino, but it's been a long time
since I tried to use it. I think the stm32plus is more complete, but
then again the Arduino has more contributor.
Last edit: 05 Oct 2020 13:33 by mhel.

Please Log in or Create an account to join the conversation.

More
04 Oct 2020 21:43 #184876 by BeagleBrainz

Please Log in or Create an account to join the conversation.

More
05 Oct 2020 10:04 #184954 by twoflowers
Thank you for uploading the code.

debounce(int32_t A) { ... } : This works wit notmally-closed-switches. If jitter is on the line, it might be that a LOW is detected. So it uses 3 samples and only whwn all 3 are LOW (==OPEN), then the resolt is OPEN, otherwise it's CLOSED

Please Log in or Create an account to join the conversation.

More
05 Oct 2020 13:33 #184965 by mhel
Replied by mhel on topic picnc to stm32f progress.
@BeagleBrainz
Thanks, I have just tried that change in stcnc.c and I'm still getting
error when commanding a zero value.

@twoflowers
Now I get it, thanks.

Please Log in or Create an account to join the conversation.

More
15 Jul 2021 23:32 #214947 by mhel
Replied by mhel on topic picnc to stm32f progress.
just to close this. I have a better port here github.com/mhelmarc/Remora-STM32, I've learnt a few tricks on the way there.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.115 seconds
Powered by Kunena Forum