Using eCapture for measing Hall sensor signals with LaunchXL-F28069M

Hi everyone,
I'm new to Altair Embed and I'm currently trying to set up a model for driving a BLDC motor.
The hardware, I'm using is
- LAUNCHXL-F28069M (TI)
- BoosterPack DRV8301 (TI)
- BLDC motor DB41M024030-A with Hall sensors (Nanotec)
I connected the Hall sensors to GPIO 11, GPIO 7 and GPIO 9. I use 3 blocks of eCapture, where I can detect the rising and falling edges of the Hall sensor signals. In order to determine the Hall state, I'd like to detect the edges of these two signals. The edge detection is quite easy realized using a unitDelay block:
This plot shows the output. The first subplot shows the output signals (rising and falling edge) of the eCapture for the first Hall sensor. The second subplot shows the output of the edge detection. Unfortunately some of the edges are not detected. Or is their detection just not plotted?
Do you have any idea, what I did wrong?
Thanks in advance.
Mandy
Answers
-
Hi Mandy,
You have done nothing wrong. It is to be expected that certain short lived events may be missed using the targetInterface block as you have. This is because the JTAG linkage is limited to ~200Hz bandwidth. We have monitorBuffer read/write blocks that can capture high speed events on the order of 100kHz+
Note that your use of eCap is recording Clk ticks between edges, not the actual edges themselves, so much less bandwidth sensitive. It will be useful to determine motor speed.
By reading the 3 GPIO hall values into a single 3 bit value, you can commute the motor based on that single Hall value. See the attached example. It uses a DRV8302, so you will have to rework it for your DRV8301. Normally a BLDC drive would take an interrupt on each hall edge and commute the motor there. It's a bit more complex and I can send you an example for that when you are ready.
I am impressed by your rapid progress as a "Newbie"!
Pete
1