I am using a custom board TMS570LS3137 with Keil ARM MDK.
I also use HALCOGEN to generate code.
All I trying to do is blink 2 led with difference freq.
One with loop_delay, another with rti_interrupt.
Here is my code:
***************************************************************************
/** @file sys_main.c
* @brief Application main file
* @date 04.October.2011
* @version 1.02.000
*
* This file contains an empty main function,
* which can be used for the application.
*/
/* (c) Texas Instruments 2009-2011, All rights reserved. */
/* USER CODE BEGIN (0) */
/* USER CODE END */
/* Include Files */
#include "sys_common.h"
#include "system.h"
#include "rti.h"
/* USER CODE BEGIN (1) */
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
/* USER CODE END */
#pragma diag_suppress=951
uint32_t flag = 1;
void main(void)
{
/* USER CODE BEGIN (3) */
#define COUNT_NUM (uint32_t)200000
uint32_t count = 0;
gioInit();
rtiInit();
rtiEnableNotification(rtiNOTIFICATION_COMPARE0);
rtiStartCounter(rtiCOUNTER_BLOCK1);
while(1)
{
gioSetBit(gioPORTA, 2, 1);
for(count = COUNT_NUM; count--; count>0);
gioSetBit(gioPORTA, 2, 0);
for(count = COUNT_NUM; count--; count>0);
}
/* USER CODE END */
}
void rtiNotification(uint32_t notification)
{
if(flag)
{
gioSetBit(gioPORTA, 6, 1);
flag = 0;
}
else
{
gioSetBit(gioPORTA, 6, 0);
flag = 1;
}
return;
}
void gioNotification(int bit)
{
return;
}
void esmGroup1Notification(uint32_t channel)
{
return;
}
void esmGroup2Notification(uint32_t channel)
{
return;
}
/* USER CODE BEGIN (4) */
/* USER CODE END */
***************************************************************************
Something's wrong but I dont know what.
It works fine with debugger but without it, only one led is blinky ( loop_delay one), another doesnt work.
???
Please help me!