Hello,
We are developing a motion control system with BISS Encoder and I have started using the TI BISS-C Library.
When i use the library functions, up to 7.1 MHZ, i can read the encoder without any problems.
Unfortunately, when i try to drive the BLDC motor using the EPWM1-2-3 outputs, thats when the problem starts. When BISS reading start, it terminates the EPWM1,2,3. One cycle later, when the BISS reading is not taking place, EPWM return back to normal. (With every cycle, i am writing %50 duty cycle to PWM1-2-3 registers again)
Below is an oscilloscope picture, visualizing my problem.
How can i stop this ? Why would PM_bissc_startOperation or PM_bissc_setupNewSCDTransfer cause this ?
Best regards,
Erman
Other config info:
BISS is using SPIA.
Therefore, for inputbar:
InputXbarRegs.INPUT1SELECT = 16; // INPUTXBAR TRIP1 -> GPIO16
For configuring EPWM4, simply
EPwm4Regs.TZCTL.bit.TZA = 1;
EPwm4Regs.TZCTL.bit.TZB = 1;
EPwm4Regs.TZFRC.bit.OST = 1;
For GPIO:
//GPIO6 und GPIO7 als PWM-Modul
GPIO_setPadConfig( 6, GPIO_PIN_TYPE_STD );
GPIO_setPinConfig( GPIO_6_EPWM4A );// Configure GPIO6 as bissC Clk master
GPIO_setPadConfig( 7, GPIO_PIN_TYPE_STD );
GPIO_setPinConfig( GPIO_7_EPWM4B );// Configure GPIO7 as SPI Clk slave
// GPIO16 is MOSI pin
GPIO_setPadConfig( 16, GPIO_PIN_TYPE_STD );
GPIO_setPinConfig( GPIO_16_SPISIMOA );
GPIO_setQualificationMode( 16, GPIO_QUAL_ASYNC );
// GPIO17 is MISO pin
GPIO_setPadConfig( 17, GPIO_PIN_TYPE_PULLUP );
GPIO_setPinConfig( GPIO_17_SPISOMIA );
GPIO_setQualificationMode( 17, GPIO_QUAL_ASYNC );
// GPIO18 is SCLK pin
GPIO_setPadConfig( 18, GPIO_PIN_TYPE_STD );
GPIO_setPinConfig( GPIO_18_SPICLKA );
GPIO_setQualificationMode( 18, GPIO_QUAL_ASYNC );
// GPIO19 is /CS pin
GPIO_setPadConfig( 19, GPIO_PIN_TYPE_PULLUP );
GPIO_setPinConfig( GPIO_19_SPISTEA );
GPIO_setQualificationMode( 19, GPIO_QUAL_ASYNC );
// Configure GPIO94 as bissC Pwr Ctl
GpioDataRegs.GPCCLEAR.bit.GPIO94 = 1;
GPIO_setPadConfig( 94, GPIO_PIN_TYPE_STD );
GPIO_setDirectionMode( 94, GPIO_DIR_MODE_OUT );