SCTimer first try

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SCTimer first try

2,059件の閲覧回数
larsemkes
Contributor II

Hello Community,

first of all, sorry for my bad english.

I use the LPC1549 Board and i want to create a Red State Machine file with the SCT0.

My program should be toogle the SCT0_OUT3, but it don´t work =(

My Main look like this:

#include "chip.h"

#include "board.h"

#include "SCT0_Init.h"
#include "sct_fsm.h"

int main(void)
{
    volatile int i = 0;

    #if defined (__USE_LPCOPEN)
        SystemCoreClockUpdate();
        #if !defined(NO_BOARD_LIB)
            Board_Init();
            Board_LED_Set(0, true);
        #endif
    #endif

    Chip_SWM_Init();
    Chip_SWM_FixedPinEnable(SWM_FIXED_SCT0_OUT3,true);

    Chip_SCT_Init(LPC_SCT0);

    sct_fsm_init();

    while(1)
    {
        i++;
    }
    return 0;
}

As attachment to find an image of my created state machine.

I hope someone can help me. Thanks alot!

ラベル(2)
2 返答(返信)

1,821件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Lars,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

I was wondering if you can upload the whole demo, then it can help me figure out the root cause of the issue.

And I've attached the application demo about the SCTimer, and please refer to it for details.

www.nxp.com/documents/application_note/AN11538.zip?fasp=1&WT_TYPE=Application%20Notes&WT_VENDOR=FREE...

Have a great day,

Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,821件の閲覧回数
larsemkes
Contributor II

Thank you for the answer. i solved my problem with the cookbook from NXP.

But now i have an other problem =(:

Is it possible to connect a (Software) variable to the source of an input for State Machine?

I want to increment a variable in my main program.

As attachment to find an image of my problem.

Problem.jpg

Thanks alot!

0 件の賞賛
返信