Hi, I am using codewarrior for mkE04Z8VFK4 programming.
I am looking for method to change frequency of pwm and methods(see attached picture) that I can see only for duty cycle?
Thanks,
Evgeny.
P.S.
Can I use the PPG component for frequency and duty cycle change?
I am trying to config the period and got the Peripheral is not set properly (property "Period device"), please see attached picture.
Hi Robin,
I saw that I have empty space that reserved for vector table and changed the project setting and now I can load the code.
MEMORY {
m_interrupts (RWX) : ORIGIN = 0x00000000, LENGTH = 0x000000C0
my_flash_seg (RX) : ORIGIN = 0x000000C0, LENGTH = 0x00000312
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x00001BF0
m_data (RW) : ORIGIN = 0x1FFFFF00, LENGTH = 0x00000400
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}
/* Define output sections */
SECTIONS
{
/* Section created to relocate code in specific Flash address */
.my_section :
{
. = ALIGN(4);
KEEP( *(.mysegment)) /* This is the tag you use in code */
. = ALIGN(4);
} > my_flash_seg
And I am using the
" __attribute__ ((section(".mysegment"))) "
Code is running but I get Alert before burn in the code , Please see attached picture.
Hi Robin,
Thank you Robin.
I solved the last problem.
I have new issue, I use the SetFreqkHz command and I see that the command allocate about 600byte in cpu memory and I have overflow of 844bytes , what is wrong?
Please find attached link.
Thanks,
Evgeny.
Hi Evgeny,
There is no enough space in m_text for your code.
The code/object generated by Processor Expert is too big to be loaded in m_text section. And the Optimize size(-Os) has been selected in Optimization level.
I am afraid you need decress some Component which eat too many memory.
Best Regards,
Robin
Hi Evgeny,
This component(PWM_LDD) implements a pulse-width modulation generator that generates a signal with variable duty and fixed frequency (period).
You can use the PPG component for frequency and duty cycle change. This component implements a programmable pulse generator that generates a signal with variable duty and variable cycle (period).
Please set properly period, for example: 6800014.6484375 MHz or 6799833.984375.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Robin,
Thank you for help.
Now I am using PPG module and trying to change the frequency at once in 1ms from 2Mhz to 5Mhz in step of 200kHz, and I see the delay(the amplitude in high position) of 5ms, it`s any way to change the frequency with minimal delay time?
Please see attached print screen.
Thanks,
Evgeny
Hi Evgeny,
Would you please attach the project here? So that I can test it on my FRDM-KE04Z board.
Best Regards,
Robin