-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gen2.4.2 (ex2.8.1) #59
Comments
the manufacture really said : fuck your foc im not gonna include an opamp for you |
Turns out mm32spin have internal comparator so it doesnt need one |
@AILIFE4798 , This board really looks very different to 2.8. So i would like to assign a new number 2.21 to it. It will not help new people to identify their board when 2.21 is hidden as 2.8.1. Yes, i am okay if you want to do a standalone MM32 firmware. Maybe you would like to copy my PAxy pin/port mapping macros and the remoteXY.c structure. Then i indeed would like to change the board numbering to Gen2.GD.x and Gen2.MM.y |
@reed-dan do you think this board is close enough to yours |
I think there are significant differences in the 2 boards. I think mine should be 2.8.0 and yours 2.8.1, but that is my opinion. |
A sub number like 2.6.1 should only be used if the boards are really like version x and x.1 of the same manufacturer and only a minor change in the defines2_6.h is needed like buzzer on slave instead of master. I would like to assign 2.21 to the 2.8.1 |
Great to have another motivated owner of some mm32 boards. The mm32 firmware is developed actively by @AILIFE4798 . If you succeed to unlock your board and are ready to upload a firmware, I am confident that he will make a firmware ready for your board. Please take a look at our wiki here to connect a mm32 board. This will be the most difficult part. |
RoboDurden, already unlocked the board, already tested the RGB and Headlight LEDs, working on the latching. Have the Hall and Gate pins sorted, all UART pins sorted. Testing bit by bit. |
@GRROWL911 could you please make a YouTube tutorial where you simply walk through all the tools that were needed to successfully upload a new firmware to the mm32 board !!!! |
@GRROWL911 you can disable latch and button in code to use a jumper to replace it |
btw unlock mm32 just require keil and stlink v2 no aditional tool needed |
everything in the wiki is bs ill make a video in the future how to use my firmware because things change everyday im not gonna make video every day |
@GRROWL911 your layout is closer to @StomperQc 's lks32 |
Once I get the board working and move to the slave, I'll try post some instructions. Basically, just the same as the Wiki posted using ST-Link and pyocd. |
@AILIFE4798 > btw unlock mm32 just require keil and stlink v2 no aditional tool needed some said its easier then the gd32 |
you need to choose erase full chip not erase sector |
@AILIFE4798 the LKS32 boards do look very, very similar, however I have not pulled them out of the HV yet, so no tracing. Once I have all the pins sorted and verified, I'll post the image. |
@AILIFE4798 I am not sure how to set Keil up for that. I am using the VS Code edition and Keil for the first time, so I have no idea what I am doing. I've a lot more experience with the NRF52 world. I'd like to know how for the slave boards. I long ago bricked my other master board. |
i do not have lks32 yet so you are on your own unless you want to send one |
@AILIFE4798 any hints on the latch/button code, I have the bins traced, however the latch does not hold, and the button does not seem to be reading correctly either. I am working slowly and methodically since this is all new to me. If I cannot get the latch/button parts working, I will just move to the motors. I also need to figure out how to startup the slave boards as they do not have a switch. |
@AILIFE4798 I'll look at them after I have these ones working. |
idk both of my board latch an button is working fine |
@AILIFE4798 I have not yet found any settings pages in the VS Code edition. I already had VS Code from my NRF52 boards, so adding the Keil extension was very easy. That was the easiest part. |
if you need to download full keil ide download from filecr the reason board is bricked is the pinmodeAF does not exist |
using slave board is very very hard my layout2.20 is still not working |
Slave board normally gets on when it receives +5V (or +15V) on the master slave uart cable. Good night from Germany |
Note:
itotal = (double)ITOTAL_DIVIDER*((uint16_t)ADC1->ITOTALADC2-itotaloffset)*100;
should be something like:
u16 adc = (uint16_t)ADC1->ITOTALADC2;
itotal = adc > itotaloffset ? ITOTAL_DIVIDER * ( adc - itotaloffset ) * 100 : 0;
otherwise, if adc is ever lower that itotaloffset, itotal will overflow and return uint16_max
… 3.hall sensor still in adc interrupt, because in HALLTIM interrupt motor does not run smooth
|
fixed and code updated |
@GRROWL911 now i have sucessfully run my board at 72mhz and code updated, but now UART does not work(ofcourse it doesnt because baud rate is wrong now) |
the PWM frequency is increased 9 times for free without losing resolution |
and i have found a bug in the startup, so that the UART1 is using APB2 runs at sysclock , but UART2 is using APB1 and APB1 is set to half of sysclock so it does not work before |
and now the code brick spin06 |
So both your spin06 master and slave are now bricked :-/ |
i will use define in the system file |
Ok now 72mhz clock working on both 05 and 06 |
it works like an if/then/else, the if before the ?, the then after the question mark, the else after the :
Makes for an inline if/then/else
No, the two variables are unsigned, so when ITOTALADC2 - subtracted from itotaloffset, they are both unsigned. if ITOTALADC2 is less than itotaloffset, overflow will result.
(uint16_t)ADC1->ITOTALADC2
static uint32_t itotaloffset=0;
…
fixed and code updated
i cannot fully understand the code above what does question mark mean but the itotal is signed int it should be alright without
|
i have now copy ITOTALADC2 to signed int but without the if..else |
incase anyone still struggling to trace the pins @GRROWL911 @RoboDurden autodetect with self programming feature is online now |
Great if it works :-) Yet I do not really see that your autodetect.c is easier to understand than mine. You at least could have adopted structs instead of But if you stay committed to your firmware we are happy to have you with us :-) As i still have no mm32 test setup nearby I would love to see a video demonstration. How do you detect the selfHold pin ? |
i know my firmware is not easy to understand but i dont think you need to understand autodetect |
it worked on my 2.8.1 without tuning values but its good if you would also test it |
if you want to request feature also can but im already at 25k |
There are already some users here with mm32 boards. So a YouTube video with a walkthrough and a demonstration of your eeprom feature might motivate some to test it. You can use ai text2speech if you do not want to speak yourself . Or only subtitles with nice techno music :-) |
i will make a video,but after its more complete |
25k :-( |
if you have used my firmware you will know why its so large |
I am still skeptical that my autodetect will ever succeed 100% with all boards. The selfHold and currentDC autodetect is too tricky for that. So your eeprom feature is not that important for me and I probably will stick to the defines_2-x-y.h files. I also want to make them compatible to my platformIO simpleFoc firmware.. |
my autodetect do not need bridge on power button just use itwith a button itll detect the latch silently on startup |
and i have implemented self hold button pin fix in my firmware but need user intervention |
I do not understand your last two comments. A video explanation would be better. |
i will only make video after the main firmware can use the result of autodetect |
maybe i can make a shit quality video for you to watch first |
No I happily wait a little longer :-) |
MCU:MM32SPIN05PFOP(32K)
Gate driver: uni u3116s
Voltage:5V!!!
No optical sensors is on this board
It is pin compatible with Layout 2.8
The text was updated successfully, but these errors were encountered: