Other Parts Discussed in Thread: HALCOGEN
hi sir,
i am using TMS470MF06607 microcontroller. (TMS470MHDK).
i want to count the number of rising edges in a given signal. so i make one gio pin(pin-4) as a input pin. i can read the num of rising edges , but i didn't get the proper count value.
i want to make the gio pin as a input pin with interrupt base. i tried to make interrupt base, but its not work.
i mentioned below what ever the changes i did it in halcogen & in my software side.
HALCOGEN CODE GENERATOR: (what changes i did)
1) In Bit-4
a) pull down is enabled
b) Rising edge is enabled
c) interrupt is enabled
d) high priority is enabled
2) In VIM channel 0-31
a) i enabled the 11th channel.
after this changes i generate the code.
CODE COMPOSER STUDIO : (in software side what i did it)
program: sys_main.c
#include "system.h"
#include "rti.h"
#include "het.h"
#include "gio.h"
#include "sci.h"
#include "sys_vim.h"
#include "esm.h"
void main(void)
{
_enable_interrupts();
gioInit();
gioEnableNotification(4); // gio pin-4
gioSetDirection(gioPORTA, 0x00000000); // make the direction is a gio input.
}
notification.c:
void gioNotification(sint32 bit)
{
if(bit == 4)
{
temp_counter++; // i try to increase the counter. this counter variable i declared globally.
}
}
i am not sure that on my code.
can you please tell me that configuration from HALCOGEN side and give some example code for simple gio read with interrupt .
i attached the images also.
vimchannel image:
regards
Arun Kumar.N