The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: TARGET_GR_LYCHEE/cmsis_cp15.h
- Revision:
- 169:a7c7b631e539
- Parent:
- 161:aa5281ff4a02
diff -r b9e159c1930a -r a7c7b631e539 TARGET_GR_LYCHEE/cmsis_cp15.h --- a/TARGET_GR_LYCHEE/cmsis_cp15.h Thu May 24 15:35:55 2018 +0100 +++ b/TARGET_GR_LYCHEE/cmsis_cp15.h Fri Jun 22 15:38:59 2018 +0100 @@ -223,7 +223,7 @@ return result; } - /** \brief Get VBAR +/** \brief Get VBAR This function returns the value of the Vector Base Address Register. @@ -244,7 +244,31 @@ */ __STATIC_FORCEINLINE void __set_VBAR(uint32_t vbar) { - __set_CP(15, 0, vbar, 12, 0, 1); + __set_CP(15, 0, vbar, 12, 0, 0); +} + +/** \brief Get MVBAR + + This function returns the value of the Monitor Vector Base Address Register. + + \return Monitor Vector Base Address Register + */ +__STATIC_FORCEINLINE uint32_t __get_MVBAR(void) +{ + uint32_t result; + __get_CP(15, 0, result, 12, 0, 1); + return result; +} + +/** \brief Set MVBAR + + This function assigns the given value to the Monitor Vector Base Address Register. + + \param [in] mvbar Monitor Vector Base Address Register value to set + */ +__STATIC_FORCEINLINE void __set_MVBAR(uint32_t mvbar) +{ + __set_CP(15, 0, mvbar, 12, 0, 1); } #if (defined(__CORTEX_A) && (__CORTEX_A == 7U) && \ @@ -413,15 +437,34 @@ __set_CP(15, 0, value, 7, 14, 1); } - -/** \brief Set CCSIDR +/** \brief Set CSSELR */ -__STATIC_FORCEINLINE void __set_CCSIDR(uint32_t value) +__STATIC_FORCEINLINE void __set_CSSELR(uint32_t value) { // __ASM volatile("MCR p15, 2, %0, c0, c0, 0" : : "r"(value) : "memory"); __set_CP(15, 2, value, 0, 0, 0); } +/** \brief Get CSSELR + \return CSSELR Register value + */ +__STATIC_FORCEINLINE uint32_t __get_CSSELR(void) +{ + uint32_t result; +// __ASM volatile("MRC p15, 2, %0, c0, c0, 0" : "=r"(result) : : "memory"); + __get_CP(15, 2, result, 0, 0, 0); + return result; +} + +/** \brief Set CCSIDR + \deprecated CCSIDR itself is read-only. Use __set_CSSELR to select cache level instead. + */ +CMSIS_DEPRECATED +__STATIC_FORCEINLINE void __set_CCSIDR(uint32_t value) +{ + __set_CSSELR(value); +} + /** \brief Get CCSIDR \return CCSIDR Register value */