I am using:
The app builds and runs.
I have tried using the Config Tools to open the project so I can change the Flexcomm device for one of the two SPI devices in the project. The app uses FC1 and FC2. I want to modify the configuration to use FC1 and FC6. I want FC6 to use the SPI pins connected to the Mikroe connectors. This will require AUX3 pinmux setting of the pins for FC6_lpspi.
I open config tools from VSCode using Open with MCUXpresso Config Tools. CT opens but when I look at the configuration I don't understand why the project works and I wonder if Config Tools obtained the right information from the project.
First of all, it appears to me that all the Flexcomm clocks are inactive.
Yet the app works. How is this possible?
I just discovered that the clocks to the FC devices is set in hardware_init.c. Apparently Config Tools did not pick up these settings. Is that because this project is not fully compatible with Config Tools? Is there any reason why I couldn't delete hardware_init.c and make the changes in Config Tools? I think it would then generate some clock files I would need to insert in the project
Secondly, Peripherals section is not enabled. Does this mean that all the peripherals in this project are used in their power up configuration? That seems to mean that all Flexcomm devices are initialized as SPI interfaces. Is that correct?
Lastly, I've skimmed the RM and found this information.
66.2.2.2 Clocking
The LP_FLEXCOMM interface requires a bus interface clock for the register interface of the selected communications module. It also requires a functional clock which generates the clocking for the peripheral communications interface. The clocks for unselected functions are internally gated.
Table 569. LPSPI clocks
Low-Power Flexible Communications Interface (LP_FLEXCOMM)
Chip mode | LPSPI operation |
Debug (the core is in Debug or Halted mode) | Can continue operating in Debug mode, if CR[DBGEN] = 1 |
Type of clock Description | |
Functional |
|
External | • The LPSPI shift register is clocked directly by the SCK clock. — In Master mode, the SCK clock is generated internally. — In Slave mode, the SCK clock is supplied externally. |
Bus | The bus clock is only used for bus accesses to the LPSPI control and configuration registers. The bus clock frequency must be high enough to support the data bandwidth requirements of the LPSPI registers, including the FIFOs. |
I assume the bus clock is one of the inactive FLEXCOMMx clocks.
The RM also refers to a "Functional" clock. Where is that on the Config Tool clock tree?
Can you help me understand what clock changes or any other changes will be needed when I modify the program in this manner? I would also appreciate if you could point me to the proper documentation I should be using.
Thank you for taking the time to help a new user understand your devices and tools!
Solved! Go to Solution.
Hi @ClarkS,
1. It's not that the project isn't compatible with ConfigTools, but rather the configuration of the LPSPI is already done manually in the project, not via ConfigTools. This is why you don't see the initializations of the module/clocks/pins on ConfigTools, but the module still works. When setting up the ConfigTools configuration, it will override the manual configuration of the project.
2. ConfigTools does not provide the device tree configuration, unfortunately.
3. How did you open ConfigTools before this error? What change did you make before seeing this “No configuration files found” error message? Could you try deleting the whole project and re-importing it?
BR,
Edwin.
Hi @ClarkS,
1. It's not that the project isn't compatible with ConfigTools, but rather the configuration of the LPSPI is already done manually in the project, not via ConfigTools. This is why you don't see the initializations of the module/clocks/pins on ConfigTools, but the module still works. When setting up the ConfigTools configuration, it will override the manual configuration of the project.
2. ConfigTools does not provide the device tree configuration, unfortunately.
3. How did you open ConfigTools before this error? What change did you make before seeing this “No configuration files found” error message? Could you try deleting the whole project and re-importing it?
BR,
Edwin.
Dear @EdwinHz ,
you mention that "the configuration of the LPSPI is already done manually in the project, not via ConfigTools."
It would be really helpful if all examples provided in the SDK would use Config Tools to setup hardware instead of doing it "manually in the project".
Edwin,
Thanks for your comments. Regarding the problem opening ConfigTools, I have two computers with MacOS. One has Ventura. It always opens Config Tools. The other one has the newer Sequoia. It has troubles opening Config Tools. I have created the project with the older computer and copied those files to the newer and it works. I suspect the problem is related to Sequoia but I am not sure. I haven't had time to trouble shoot it further.
Regarding the Zephyr device tree, I'm pretty sure I saw something about Config Tools providing Device Tree configs. As I recall there was a Zephyr mode for that version of CT. Is there another version of CT that provides this information?
Hi @ClarkS,
I found the following on the "User Guide for MCUXpresso Config Tools (Desktop)" (GSMCUXCTUG
I just thought of another question. I want to eventually convert this project to be a Zephyr project. Isn't there some way to have Config Tools provide the device tree configuration? I'm pretty sure I've seen it somewhere in CT, but I can't find it now.
I have found an additional problem. Now when I try to open the Config Tool from VSCode, it first says it’s creating configuration files, then it throws an error that says “No configuration files found”. I’ve tried deleting the program folder and re-importing the program from the SDK, then when that is complete trying to open Config, but the error always prevents Config Tools from opening.
Hi,
If you have created or opened the SDK project from SDK github repo, it uses a new type of west tool based build system that is unfortunately not yet supported by the Config Tools. The generated source files have to be imported and managed manually, please see the following page that describes it: https://github.com/nxp-mcuxpresso/vscode-for-mcux/wiki/Working-with-Config-Tools
Regards
Petr Hradsky
Config Tools Team