Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MAXREFDES131_Qt_Demo MAX32630FTHR_iButton_uSD_Logger MAX32630FTHR_DS18B20_uSD_Logger MAXREFDES130_131_Demo ... more
OneWire_Masters/GPIO/owlink.s@30:fdd7a0f82f2f, 2016-03-29 (annotated)
- Committer:
- IanBenzMaxim
- Date:
- Tue Mar 29 15:40:58 2016 +0000
- Revision:
- 30:fdd7a0f82f2f
- Parent:
- 29:5c51a17cfbf5
- Child:
- 31:7c684e49fa8f
Switch on toolchain to enable ARM (armasm) and IAR assembler support. Still need support for GCC and armclang assemblers.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
IanBenzMaxim | 28:057bb14d3cee | 1 | PROC_CLOCK_MHZ EQU 24 ; Processor clock in MHz |
IanBenzMaxim | 28:057bb14d3cee | 2 | OVERHEAD_TUNING EQU 21 ; Fraction where OverheadTime(us) = OVERHEAD_TUNING / PROC_CLOCK_MHZ |
IanBenzMaxim | 28:057bb14d3cee | 3 | ; Make PROC_CLOCK_MHZ and OVERHEAD_TUNING divisible by PROC_CYCLES_PER_LOOP for best results |
IanBenzMaxim | 28:057bb14d3cee | 4 | |
IanBenzMaxim | 28:057bb14d3cee | 5 | PIPELINE_REFILL_PROC_CYCLES EQU 1 ; ARM specifies 1-3 cycles for pipeline refill following a branch |
IanBenzMaxim | 28:057bb14d3cee | 6 | PROC_CYCLES_PER_LOOP EQU (2 + PIPELINE_REFILL_PROC_CYCLES) |
IanBenzMaxim | 28:057bb14d3cee | 7 | LOOPS_PER_US EQU (PROC_CLOCK_MHZ / PROC_CYCLES_PER_LOOP) ; Number of loop passes for a 1 us delay |
IanBenzMaxim | 28:057bb14d3cee | 8 | LOOPS_REMOVED_TUNING EQU (OVERHEAD_TUNING / PROC_CYCLES_PER_LOOP) |
IanBenzMaxim | 30:fdd7a0f82f2f | 9 | |
IanBenzMaxim | 30:fdd7a0f82f2f | 10 | #ifdef TOOLCHAIN_IAR |
IanBenzMaxim | 30:fdd7a0f82f2f | 11 | SECTION owlink : CODE |
IanBenzMaxim | 30:fdd7a0f82f2f | 12 | #else |
IanBenzMaxim | 29:5c51a17cfbf5 | 13 | AREA owlink, CODE |
IanBenzMaxim | 30:fdd7a0f82f2f | 14 | #endif |
IanBenzMaxim | 28:057bb14d3cee | 15 | |
IanBenzMaxim | 28:057bb14d3cee | 16 | ; void ow_usdelay(unsigned int time_us) |
IanBenzMaxim | 29:5c51a17cfbf5 | 17 | EXPORT ow_usdelay |
IanBenzMaxim | 29:5c51a17cfbf5 | 18 | ow_usdelay |
IanBenzMaxim | 28:057bb14d3cee | 19 | mov R1, #LOOPS_PER_US |
IanBenzMaxim | 28:057bb14d3cee | 20 | mul R0, R0, R1 |
IanBenzMaxim | 28:057bb14d3cee | 21 | sub R0, R0, #LOOPS_REMOVED_TUNING |
IanBenzMaxim | 29:5c51a17cfbf5 | 22 | loop |
IanBenzMaxim | 28:057bb14d3cee | 23 | subs R0, R0, #1 |
IanBenzMaxim | 28:057bb14d3cee | 24 | bne loop |
IanBenzMaxim | 28:057bb14d3cee | 25 | bx R14 |
IanBenzMaxim | 28:057bb14d3cee | 26 | |
IanBenzMaxim | 28:057bb14d3cee | 27 | END |