Merge branch 'main' into fix-cmake-spaces

This commit is contained in:
Rahul Kar 2025-04-25 21:06:22 +05:30 committed by GitHub
commit 428b4c70c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 16 additions and 4 deletions

View file

@ -234,6 +234,11 @@ __attribute__(( weak )) void vApplicationSetupTickTimerInterrupt( void )
{
const uint32_t ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PRESCALE) / configTICK_RATE_HZ ) - 1UL;
/* PR1 is 16-bit. Ensure that the configPERIPHERAL_CLOCK_HZ and
* configTICK_RATE_HZ are defined such that ulCompareMatch value would fit
* in 16-bits. */
configASSERT( ( ulCompareMatch & 0xFFFF0000 ) == 0 );
T1CON = 0x0000;
T1CONbits.TCKPS = portPRESCALE_BITS;
PR1 = ulCompareMatch;