FreqMeasureMulti on the T4

Status
Not open for further replies.

xenington

Well-known member
OK. So I have had look into porting FreqMeasureMulti for the t4 and it is all very confusing. Can someone give me some pointers please?

I am not sure which timer to use: flexpwm or GPT? Both can be triggered by waveform features. From the datasheet, flexpwm4 is attached to pins 22 (AD_B1_08 as used by FreqMeasure), 23 (AD_B1_09) and 3 (EMC_05). That gives 3 readings only. GPT1 is not attached to any pins and GPT2 is only attached to pin 15 (AD_B1_03). Can 1 pin take multiple readings? Or can a variety of timers be used across multiple pins?

My goal is to measure 4 square-wave frequencies in the range 1KHz to 100KHz, up to 16 times each per second. I would prefer to use FreqMeasure if possible as FreqCount probably won't provide enough resolution at this sample rate. Might the t4 push FreqMeasure up that high?

The waves are produced by 4 x fgm3 magnetic sensors https://www.fgsensors.com/documentation. The signals are level-shifted by an Adafruit TXB0108 https://www.adafruit.com/product/395 before entering the t4.

Thanks for your help.
 
Last edited:
Status
Not open for further replies.
Back
Top