This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem whit HET edge interrupt in Hercules TMS570

Other Parts Discussed in Thread: HALCOGEN, TMS570LS3137

I am a beginner with ti mikrocontrollers so I'd like to apologize in advance if my problem is something I should have figured out myself. Still I hope someone can point me in the right direction.

I am currently working on a Hercules TMS570 (3137) by using HalCoGen 3.06 and CCS 5.5

My main problems occurs using the het module.

My main problem comes with edge interrupt. I did set pin 16 and 26 on edge0 and edge1 on falling edge. Activated both interrupts on high level and also activated vim-channel 10 & 24 (HET High & HET Low to be on the safe side).

Again my code runs hetInit(); and also

 _enable_IRQ();

edgeEnableNotification(hetREG1, edge0);

edgeEnableNotification(hetREG1, edge1);

Still I do not seem to have any activity in the void edgeNotification(hetBASE_t * hetREG,uint32 edge). 

Did I make any obvious setup mistakes or should I look for the interrupts in the hetNotification?

FYI: rti-interrupts and can-interrupts are working perfectly in my setup.

Thanks for your time.

  • Hello:

    We have received your post and we will come back soon with some feedback.

    Regards.

  • Did you provide an edge on the HET pins in question?   And do you do this while running (You need to do that and not try to 'step').

  • Hi Sebastian

    Can you please send the HALCoGen project file ( HCG and DIL) to comment. Thanks!.

     

  • Hey Guys,

    thanks for reading my post.

    I did try applying both rising and falling edges to the pin while running but I must admit that i lack the hardware knowledge to guarantee propper test setup. I will try to verify my problem later today, with the collegue who designed the board I am testing on, and will update you whether or not my problem persists.

    Still added the .hgc and .dil to his post.

    2626.HalCoGen-Project.rar

    Thanks again for your time.

    Edit: I did some further testing bot with producing edged by toggling an outputpin at an interval of a second and by using outside sources (grounding a constand voltage on a pin and applying+taking away again of an outside voltage). Further I checked on the edge pins in question with constant gioGetBit to verify in running (not step by step) debug mode that the signal propperly reaches the dsp.

    Even tho the input pin was read correctly according to the signal i applied either the a brakepoint or a gioSetBit, for an unrelated control pin, inside the edgeNotification were triggered.

    This might be a bit far fetched, but seeing that the hetInit() never sets any pins to output not matter what i set up in HalCoGen and ich always have to call a gioSetDirection in the code, is there a similar function for the edge detection that i have missed yet?

    (I can look up the code changes in the hetInit() when setting pins to output or edge ect in HalCoGen, but i was told that this function never sets up the direction or an initial value of a pin. It is supposed to have security reasons i could not quiet follow.)

  • Hi

    Attached is a simple Edge counter example using TMS570LS3137 device. An external connection must be made between A5 pin and W3 pin for this to work. The GIOA[0] pin is toggled 100 times with a small delay between each toggle. The Input Capture unit's NHET1[6] pin takes it as input and counts the edges captured

    7506.HetPwmTest.zip

  • Hey Folks,

    just wanted to update that i managed to solve my problem by recreating my project from scratch. I was not able to identify what caused the lack of het interrupts and what setting i missed. If I ever manage to comeback to the faulty project and analyze it properly I will give a feedback on what the problem was. Otherwise it can be regarded as solved as far as I'm concerned.

    So thanks again for your help.

    greeting S