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

FreeRTOS issue with NVIC registers #47

Open
AleksandrVin opened this issue Jan 25, 2024 · 1 comment
Open

FreeRTOS issue with NVIC registers #47

AleksandrVin opened this issue Jan 25, 2024 · 1 comment

Comments

@AleksandrVin
Copy link

When using cmsis_rtos_v2 or v1 implementation generated from STM32CubeMX execution asserts on "obtained from hardware parameter. I can't understand what causes this but it is certainly incorrect and manual variable modification helps this code to pass. This code works on real bluepill stm32.

File: port.c from cmsis_rtos_v2

		#ifdef configPRIO_BITS
		{
			/* Check the FreeRTOS configuration that defines the number of
			priority bits matches the number of priority bits actually queried
			from the hardware. */
			ulMaxPRIGROUPValue = 3; // qemu is broken here. was 4294967295
			configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS );
		}
                #endif

I assume that ulMaxPRIGROUPValue is incorrect. Due to an error in NVIC register values.
This one probably

volatile uint8_t * const pucFirstUserPriorityRegister = ( volatile uint8_t * const ) ( portNVIC_IP_REGISTERS_OFFSET_16 + portFIRST_USER_INTERRUPT_NUMBER );
@beckus
Copy link
Owner

beckus commented Jan 26, 2024

Hello @AleksandrVin, thank you for reporting this issue and providing details.
At the moment, I am not set up to troubleshoot this, and probably will not be able to help. Best of luck, and if you have any additional details, please feel free to post and/or submit a patch to fix the issue.
Thank you, and sorry I am not of more help.

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