2021-05-07 09:21:09 -04:00
|
|
|
/* Memory configuration */
|
2021-08-20 15:41:58 -04:00
|
|
|
#if defined MICROPY_HW_FLASH_RESERVED
|
|
|
|
reserved_size = MICROPY_HW_FLASH_RESERVED;
|
2021-08-20 15:41:58 -04:00
|
|
|
#endif
|
|
|
|
|
2022-06-22 15:26:54 -04:00
|
|
|
#if MICROPY_HW_FLASH_TYPE == qspi_nor_flash
|
2021-05-07 09:21:09 -04:00
|
|
|
flash_start = 0x60000000;
|
2021-08-20 15:41:58 -04:00
|
|
|
#else
|
2021-08-20 15:41:58 -04:00
|
|
|
#error Unknown MICROPY_HW_FLASH_TYPE
|
2021-08-20 15:41:58 -04:00
|
|
|
#endif
|
2021-08-20 15:41:58 -04:00
|
|
|
flash_size = MICROPY_HW_FLASH_SIZE;
|
2021-05-07 09:21:09 -04:00
|
|
|
flash_end = DEFINED(reserved_size) ? ((flash_start) + (flash_size - reserved_size)) : ((flash_start) + (flash_size));
|
|
|
|
flash_config_start = flash_start;
|
|
|
|
flash_config_size = 0x00001000;
|
2021-08-20 15:41:58 -04:00
|
|
|
ivt_start = flash_start + 0x00001000;
|
2021-05-07 09:21:09 -04:00
|
|
|
ivt_size = 0x00001000;
|
2021-08-20 15:41:58 -04:00
|
|
|
interrupts_start = flash_start + 0x00002000;
|
2021-05-07 09:21:09 -04:00
|
|
|
interrupts_size = 0x00000400;
|
2021-08-20 15:41:58 -04:00
|
|
|
text_start = flash_start + 0x00002400;
|
|
|
|
vfs_start = flash_start + 0x00100000;
|
|
|
|
text_size = ((vfs_start) - (text_start));
|
2021-05-07 09:21:09 -04:00
|
|
|
vfs_size = ((flash_end) - (vfs_start));
|
|
|
|
itcm_start = 0x00000000;
|
mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle. The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.
Extensions: support PWM for channel pairs. Channel pairs are declared by
supplying 2-element tuples for the pins. The two channels of a pair must
be the A/B channel of a FLEXPWM module. These form than a complementary
pair.
Additional supported keyword arguments:
- center=value Defines the center position of a pulse within the pulse
cycle. The align keyword is actually shortcut for center.
- sync=True|False: If set to True, the channels will be synchronized to a
submodule 0 channel, which has already to be enabled.
- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
channels are Center-Aligned or Edge-aligned. The channels must be either
complementary a channel pair or a group of synchronized channels. It may
as well be applied to a single channel, but withiout any benefit.
- invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the
first pin, bit 1 the second.
- deadtime=time_ns time of complementary channels for delaying the rising
slope.
- xor=0|1|2 xor causes the output of channel A and B to be xored. If
applied to a X channel, it shows the value oif A ^ B. If applied to an A
or B channel, both channel show the xored signal for xor=1. For xor=2,
the xored signal is split between channels A and B. See also the
Reference Manual, chapter about double pulses. The behavior of xor=2 can
also be achieved using the center method for locating a pulse within a
clock period.
The output is enabled for board pins only.
CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output. That applies only to FLEXPWM pins. The
use of QTMR pins which are not board pins will be rejected.
As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-07-26 06:48:25 -04:00
|
|
|
itcm_size = 0x00010000;
|
2021-05-07 09:21:09 -04:00
|
|
|
dtcm_start = 0x20000000;
|
2021-08-20 15:41:58 -04:00
|
|
|
dtcm_size = 0x00018000;
|
2021-05-07 09:21:09 -04:00
|
|
|
ocrm_start = 0x20200000;
|
mimxrt: Support PWM using the FLEXPWM and QTMR modules.
Frequency range 15Hz/18Hz to > 1 MHz, with decreasing resolution of the
duty cycle. The basic API is supported as documentated, except that
keyword parameters are accepted for both the instatiaton and the
PWM.init() call.
Extensions: support PWM for channel pairs. Channel pairs are declared by
supplying 2-element tuples for the pins. The two channels of a pair must
be the A/B channel of a FLEXPWM module. These form than a complementary
pair.
Additional supported keyword arguments:
- center=value Defines the center position of a pulse within the pulse
cycle. The align keyword is actually shortcut for center.
- sync=True|False: If set to True, the channels will be synchronized to a
submodule 0 channel, which has already to be enabled.
- align=PWM.MIDDLE | PMW.BEGIN | PWM.END. It defines, whether synchronized
channels are Center-Aligned or Edge-aligned. The channels must be either
complementary a channel pair or a group of synchronized channels. It may
as well be applied to a single channel, but withiout any benefit.
- invert= 0..3. Controls ouput inversion of the pins. Bit 0 controls the
first pin, bit 1 the second.
- deadtime=time_ns time of complementary channels for delaying the rising
slope.
- xor=0|1|2 xor causes the output of channel A and B to be xored. If
applied to a X channel, it shows the value oif A ^ B. If applied to an A
or B channel, both channel show the xored signal for xor=1. For xor=2,
the xored signal is split between channels A and B. See also the
Reference Manual, chapter about double pulses. The behavior of xor=2 can
also be achieved using the center method for locating a pulse within a
clock period.
The output is enabled for board pins only.
CPU pins may still be used for FLEXPWM, e.g. as sync source, but the signal
will not be routed to the output. That applies only to FLEXPWM pins. The
use of QTMR pins which are not board pins will be rejected.
As part of this commit, the _WFE() statement is removed from
ticks_delay_us64() to prevent PWM glitching during calls to sleep().
2021-07-26 06:48:25 -04:00
|
|
|
ocrm_size = 0x00018000;
|
2021-05-07 09:21:09 -04:00
|
|
|
|
2022-06-22 14:39:23 -04:00
|
|
|
#if MICROPY_HW_SDRAM_AVAIL
|
2021-08-20 15:41:58 -04:00
|
|
|
sdram_start = 0x80000000;
|
|
|
|
sdram_size = MICROPY_HW_SDRAM_SIZE;
|
|
|
|
#endif
|
|
|
|
|
2020-04-14 15:08:59 -04:00
|
|
|
/* 24kiB stack. */
|
|
|
|
__stack_size__ = 0x6000;
|
|
|
|
_estack = __StackTop;
|
|
|
|
_sstack = __StackLimit;
|
|
|
|
|
2022-06-22 14:39:23 -04:00
|
|
|
#if MICROPY_HW_SDRAM_AVAIL
|
2021-08-20 15:41:58 -04:00
|
|
|
_gc_heap_start = ORIGIN(m_sdram);
|
|
|
|
_gc_heap_end = ORIGIN(m_sdram) + LENGTH(m_sdram);
|
|
|
|
#else
|
2020-04-14 15:08:59 -04:00
|
|
|
/* Use second OCRAM bank for GC heap. */
|
2021-07-03 12:39:17 -04:00
|
|
|
/* Use all OCRAM for the GC heap. */
|
2021-05-07 09:21:09 -04:00
|
|
|
_gc_heap_start = ORIGIN(m_ocrm);
|
|
|
|
_gc_heap_end = ORIGIN(m_ocrm) + LENGTH(m_ocrm);
|
2021-08-20 15:41:58 -04:00
|
|
|
#endif
|