git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@348 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
2a249f7ff9
commit
6596113930
|
@ -31,7 +31,7 @@
|
|||
/*
|
||||
* Uncomment this if you want a 48MHz system clock, else it will be 72MHz.
|
||||
*/
|
||||
//#define SYSCLK_48
|
||||
#define SYSCLK_48
|
||||
|
||||
/*
|
||||
* NOTES: PLLPRE can be 1 or 2, PLLMUL can be 2..16.
|
||||
|
|
|
@ -132,18 +132,19 @@ void PendSVVector(void) {
|
|||
chSysUnlock();
|
||||
asm volatile ("pop {pc}");
|
||||
}
|
||||
asm volatile ("pop {lr}");
|
||||
|
||||
asm volatile ("pop {lr} \n\t" \
|
||||
"movs r3, #0 \n\t" \
|
||||
"mrs %0, PSP" : "=r" (sp_thd) : );
|
||||
register uint32_t tmp asm ("r3") = BASEPRI_USER;
|
||||
#ifdef CH_CURRP_REGISTER_CACHE
|
||||
asm volatile ("stmdb %0!, {r3-r6,r8-r11, lr}" :
|
||||
asm volatile ("mrs %0, PSP \n\t" \
|
||||
"stmdb %0!, {r3-r6,r8-r11, lr}" :
|
||||
"=r" (sp_thd) :
|
||||
"r" (sp_thd));
|
||||
"r" (sp_thd), "r" (tmp));
|
||||
#else
|
||||
asm volatile ("stmdb %0!, {r3-r11,lr}" :
|
||||
asm volatile ("mrs %0, PSP \n\t" \
|
||||
"stmdb %0!, {r3-r11,lr}" :
|
||||
"=r" (sp_thd) :
|
||||
"r" (sp_thd));
|
||||
"r" (sp_thd), "r" (tmp));
|
||||
#endif
|
||||
|
||||
(otp = currp)->p_ctx.r13 = sp_thd;
|
||||
|
|
|
@ -24,6 +24,12 @@
|
|||
|
||||
typedef void *regarm;
|
||||
|
||||
/*
|
||||
* Port-related configuration parameters.
|
||||
*/
|
||||
#define BASEPRI_USER 0 /* User level BASEPRI, 0 = disabled. */
|
||||
#define BASEPRI_KERNEL 0x10 /* BASEPRI level within kernel lock. */
|
||||
|
||||
/*
|
||||
* Interrupt saved context, empty in this architecture.
|
||||
*/
|
||||
|
@ -83,13 +89,11 @@ typedef struct {
|
|||
}
|
||||
|
||||
#define chSysLock() { \
|
||||
register uint32_t tmp asm ("r3"); \
|
||||
asm volatile ("movs %0, #0x10" : "=r" (tmp): ); \
|
||||
register uint32_t tmp asm ("r3") = BASEPRI_KERNEL; \
|
||||
asm volatile ("msr BASEPRI, %0" : : "r" (tmp)); \
|
||||
}
|
||||
#define chSysUnlock() { \
|
||||
register uint32_t tmp asm ("r3"); \
|
||||
asm volatile ("movs %0, #0" : "=r" (tmp): ); \
|
||||
register uint32_t tmp asm ("r3") = BASEPRI_USER; \
|
||||
asm volatile ("msr BASEPRI, %0" : : "r" (tmp)); \
|
||||
}
|
||||
#define chSysSwitchI(otp, ntp) { \
|
||||
|
|
|
@ -79,6 +79,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
|
|||
problems when the CH_USE_MESSAGES_PRIORITY was enabled, this option is
|
||||
disabled by default in ChibiOS/RT so it should not affect any user.
|
||||
- Merged the documentation fixes submitted by Leon Woestenberg (thank you).
|
||||
- Made the default BASEPRI levels (CM3 port) configurable into chcore.h.
|
||||
|
||||
*** 0.6.7 ***
|
||||
- NEW: New chThdCreateFast() API, it is a simplified form of chThdCreate()
|
||||
|
|
Loading…
Reference in New Issue