Hello
I am using LPC1823 controller for my project. I want to validate the system frequency is set correctly or not, for that reason I need to set the CLK2 as CLKOUT so that the frequency is visible on osciloscope. Can you guide me with go can I set CLK2 as CLKOUT so that I can see the system frequency on it.
解決済! 解決策の投稿を見る。
Hi
1. Abort "how to configure the CLK2 pin"
You can config clock2 pin through Chip_SCU_ClockPinMux function.
2. About "set the clock frequency to 1MHz"
You can config clock through blow functions
Chip_Clock_SetDivider();
Chip_Clock_SetBaseClock();
Chip_Clock_EnableBaseClock();
Or you can download and refer to LPC 18XX examples.
LPCOpen Software for LPC18XX | NXP Semiconductors
Hope this will help you.
BR
Hang
Hi @pranavkolte
You need to configure the Clock Output (CLKOUT) feature correctly. Below are the steps you can follow to achieve this:
1. **Configure the Clock Output Pin:**
Ensure that the CLKOUT function is configured on the appropriate pin (typically this is a specific pin that can be multiplexed to CLKOUT). .
2. **Set the CLKOUT Configuration Register:**
Use the appropriate registers to set the clock source for CLKOUT.
Step-by-Step Guide
1. **Enable the Clock Output Pin:**
Configure the pin function using the IOCON register.
2. **Configure the CLKOUT Source:**
Select the clock source and divider for the CLKOUT. This involves writing to the CLKOUTCFG register. The CLKOUTCFG register controls the clock source and the divider for the CLKOUT pin.
3. **Enable the Clock Output Function:**
Ensure that the clock output function is enabled.
Hope this will help you.
BR
Hang
Hello @HangZhang
Thank you for the guidance, I tried it and able to see the frequency now. Can please let me know about how can I set the clock frequency to 1MHz and how to configure the CLK2 to see 1 MHz or send me any example code to do so.
Hi
1. Abort "how to configure the CLK2 pin"
You can config clock2 pin through Chip_SCU_ClockPinMux function.
2. About "set the clock frequency to 1MHz"
You can config clock through blow functions
Chip_Clock_SetDivider();
Chip_Clock_SetBaseClock();
Chip_Clock_EnableBaseClock();
Or you can download and refer to LPC 18XX examples.
LPCOpen Software for LPC18XX | NXP Semiconductors
Hope this will help you.
BR
Hang
Hello @HangZhang
Can you please help or guide me with how can I use tinyusb with my project but I do not want to use the board files . I just want the device should be displayed in device manager, till now what ever I have done it shows this in device manager.
.
It will be helpful if you can share a code or project of that.