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
- Committer:
- IanBenzMaxim
- Date:
- 2016-03-29
- Revision:
- 30:fdd7a0f82f2f
- Parent:
- 29:5c51a17cfbf5
- Child:
- 31:7c684e49fa8f
File content as of revision 30:fdd7a0f82f2f:
PROC_CLOCK_MHZ EQU 24 ; Processor clock in MHz OVERHEAD_TUNING EQU 21 ; Fraction where OverheadTime(us) = OVERHEAD_TUNING / PROC_CLOCK_MHZ ; Make PROC_CLOCK_MHZ and OVERHEAD_TUNING divisible by PROC_CYCLES_PER_LOOP for best results PIPELINE_REFILL_PROC_CYCLES EQU 1 ; ARM specifies 1-3 cycles for pipeline refill following a branch PROC_CYCLES_PER_LOOP EQU (2 + PIPELINE_REFILL_PROC_CYCLES) LOOPS_PER_US EQU (PROC_CLOCK_MHZ / PROC_CYCLES_PER_LOOP) ; Number of loop passes for a 1 us delay LOOPS_REMOVED_TUNING EQU (OVERHEAD_TUNING / PROC_CYCLES_PER_LOOP) #ifdef TOOLCHAIN_IAR SECTION owlink : CODE #else AREA owlink, CODE #endif ; void ow_usdelay(unsigned int time_us) EXPORT ow_usdelay ow_usdelay mov R1, #LOOPS_PER_US mul R0, R0, R1 sub R0, R0, #LOOPS_REMOVED_TUNING loop subs R0, R0, #1 bne loop bx R14 END