5
Last change
on this file since 2ae0acb was
2ae0acb,
checked in by Christian Mauderer <Christian.Mauderer@…>, on 10/11/17 at 13:38:13
|
bsp/atsam: Add bsp_restart.
|
-
Property mode set to
100644
|
File size:
898 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2017 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #include <rtems.h> |
---|
16 | #include <rtems/score/armv7m.h> |
---|
17 | #include <bsp.h> |
---|
18 | |
---|
19 | static void ARMV7M_Systick_cleanup(void) |
---|
20 | { |
---|
21 | volatile ARMV7M_Systick *systick = _ARMV7M_Systick; |
---|
22 | systick->csr = 0; |
---|
23 | } |
---|
24 | |
---|
25 | void bsp_restart( const void *const addr ) |
---|
26 | { |
---|
27 | rtems_interrupt_level level; |
---|
28 | void(*start)(void) = (void(*)(void))(addr); |
---|
29 | |
---|
30 | rtems_interrupt_disable(level); |
---|
31 | (void)level; |
---|
32 | rtems_cache_disable_instruction(); |
---|
33 | rtems_cache_disable_data(); |
---|
34 | rtems_cache_invalidate_entire_instruction(); |
---|
35 | rtems_cache_invalidate_entire_data(); |
---|
36 | ARMV7M_Systick_cleanup(); |
---|
37 | |
---|
38 | start(); |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.