Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commenting out CONFIG_KERNEL_NONE = 1 might be switching off the interrupts. #25

Closed
nyh-workshop opened this issue Aug 22, 2022 · 6 comments

Comments

@nyh-workshop
Copy link

I'm working on a small W806 app (https://github.com/nyh-workshop/w806-i2s) and trying to put a FreeRTOS inside.

From the readme, I need to comment out the "CONFIG_KERNEL_NONE = 1" or else it won't work.

However when I comment out this setting, most of the interrupts are not being called anymore, even the DMA ones.

There is someone also discussing about this here: http://ask.winnermicro.com/question/269.html. There is a possible answer at the bottom of that thread - however my Mandarin is limited and the translation seems to be not working good today.

It could mean to remove the macros, but I'm not sure which one to remove on these files.

@IOsetting
Copy link
Owner

I tried the changes in the discussion,

  1. Comment out CONFIG_KERNEL_NONE = 1 in csi_config.h
  2. Edit function SystemInit() in system.c, change it to
void SystemInit(void)
{
    __set_VBR((uint32_t) & (irq_vectors));
    __set_CHR(__get_CHR() | CHR_IAE_Msk);

    /* Clear active and pending IRQ */
    VIC->IABR[0] = 0x0;
    VIC->ICPR[0] = 0xFFFFFFFF;

    __enable_excp_irq();
}

Then the timer interrupts will work.

@nyh-workshop
Copy link
Author

nyh-workshop commented Aug 24, 2022

Hi there, thanks very much for the translation and the fix! This fix actually works!
Is there a plan to add this fix so that it's easier for us to integrate the FreeRTOS inside while using other interrupts? 👍

@IOsetting
Copy link
Owner

I am not quite sure about the side effects... I didn't play much with w806 recently. Sure, the macros will be updated when there are more feedback on this change.

@nyh-workshop
Copy link
Author

Hello, thanks for the assistance. I have written another example code with this change and so far it is running good. :)

@IOsetting
Copy link
Owner

It's really cool~ I will try it when I get a pcm5102.

@IOsetting
Copy link
Owner

I played it using a max98357. The music reminds me of the old games, beautiful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants