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

Load RAM area in Core1's interrupt context to ensure the cache in Core0 is written back into RAM, instead of use iomen malloc. #118

Open
jimaobian opened this issue Dec 22, 2020 · 0 comments

Comments

@jimaobian
Copy link

Code in Core1 like this will ensure the cache in Core0 is written back into RAM.

void core1_interrupt_lock(){
    spinlock_lock(&mMultiInterruptLock);
}

void core1_interrupt_unlock(){
    spinlock_unlock(&mMultiInterruptLock);
}


int test(void *ctx){
    // printk("start\n");
    volatile uint8_t* ptr = lcd_get_color_p();
    if (ptr)
    {
        for (int i = 0; i < 2400; i++)
        {
            *ptr;
            ptr += 64;
        }
    }
    core1_interrupt_unlock();
}
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

1 participant