dev2 and Rumba32, Servo pins not working after restructuring board files

Hello,
had a break in upgrading my selfmade cartesian from rumba to rumba32 board.
In my tests one year ago I downloaded the repetier firmware dated 2020_11_05.
A lot of the features including BLTouch and a second connected servo were working.

Now I downloaded the firmware at 2022_02_04, tried to merge the config files, an did some tests.
Both servo signals at the Board pins PA_4 and PD_14 are missing now (checked also with an oszilloscope).
I'm using one for BLTouch and one for a planned extruder lift.

Here are the relevant config parts regarding servos, I used them at both versions:

    configuration_io.h, my adoptions 2020_11_05 based on Sample Delta with Rumba32:
            // Servo for z-probe
            IO_OUTPUT(Servo1Pin, 4)
            SERVO_ANALOG(ZProbeServo, 0, Servo1Pin, 500, 2500, 1473)

            // Servo for Extruderlift
            IO_OUTPUT(Servo2Pin, PD14)
            SERVO_ANALOG(ExtruderLiftServo, 1, Servo2Pin, 500, 2500, 1473)
    
    configuration.h, my adoptions 2020_11_05
            #define NUM_SERVOS 2
            #define MOTHERBOARD MOTHERBOARD_RUMBA32

            #define SERVO_LIST \
            { &ZProbeServo, &ExtruderLiftServo}


The rest of the files are original version 2022_02_04


Found, that in 2022_02_04\src\Repetier\buildroot\boardFiles\rumba32\variant.h there is:
    #define HAL_DAC_MODULE_ENABLED

...and in 2022_02_04\src\Repetier\buildroot\boardFiles\rumba32\PeripheralPins.c there is a section:

    #ifdef HAL_DAC_MODULE_ENABLED
    const PinMap PinMap_DAC[] = {
        {PA_4,  DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1
        {PA_5,  DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2
        { NC, NP, 0 }
    };
    #endif
    
Trying to set HAL_DAC_MODULE_ENABLED to undefined (like in version 20201105) produces compiler errors.
Tried to just comment the PA_4 line didn't help either.

So I need to ask for help.
Do you recommend to use other pins to connect BLTouch and the extruderlift servo?

Thanks in advance!


Comments

  • Tried some more variations in the current version:
    - used platform versions STSTM@8.1.0 (original 14.1.0) -> no servo signal
    - used platform versions STSTM@11.0.0 -> no servo signal
    - used Servo pins PD14 and PD15 -> no servo signal
    - used Servo pins PD12 and PD13 -> no servo signal
    - commented out PA_4 in peripheralPins.c, HAL_DAC_MODULE_ENABLED --> no servo signal
    - commented out PA_4 in peripheralPins.c, HAL_ADC_MODULE_ENABLED --> no servo signal

    In the github Version downloaded Nov 2020 the following pins can be used: PA4, PD12, PD13, PD14, PD15.

    So there must be something common like timers, interrupt etc.









  • The servo pins are not that relevant, there is no hardware PWM for them. Instead the servos are controlled by one timer interrupt routine that controls up to 4 servos with one interrupt. In HAL.h I found this:

    // Timer 13 does crash firmware at least for rumba32!
    #ifndef SERVO_TIMER_NUM
    #define SERVO_TIMER_NUM 9
    #endif

    So if you have not set SERVO_TIMER_NUM in configration.h it is timer 9 and you should not use timer 9 for any pwm output. In docs you see which pins use that timer if hardware pwm is selected. From comment I guess it was 13 before. Any unused timer is allowed, so can you set it to that if 9 and 13 have conflicts. If that does not help I will try to find some time to test. Maybe my bltouch is not defect and I then have same problem.
  • Have a version with servo signals (called it 20201105) and the current version (20220204) with no servo signals.

    Have no SERVO_TIMER_NUM in configuration.h
    In both versions the Lines in Repetier\src\boards\STM32F4\HAL.h with #define xy_TIMER_NUM z are identical.

    Tried also to replace the SERVO_TIMER_NUM 9 with 12, 8, 5..2, no servo signal (tested with Pin PA4)

    If you have some more hints to try, I could test it.
    As said, I have a working version and a non working version

  • Will try to do some tests on weekend. Sounds like a deeper problem, also I would not know why it should not work at the moment, but we will see. Sometimes it is just a simple modification that causes such problems as time does not get started or something like that.
  • Just wanted to bring this up again.
    If I can do some tests to find the reason, let me know
  • It is not forgotton, just lack of time I can invest.
  • Ok as promised, it was not forgotton. After some testing I found a contact loose on my bl touch, so that is working. Testing servo it did in deed not work any more also I checked and the code wasn't changed in 2 years. I think it is because I use a newer STL32 library and there might be a change in between.  Anyhow, I made some changes and now it is working for me on rumba32 again so hope it also works for you now.
  • Servo signals are working again!
    Thanks very much for your help!
Sign In or Register to comment.