Peripheral view for LPC1768?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Peripheral view for LPC1768?

1,517 Views
raghavendraraol
Contributor I

MCUxpresso ide (all versions) don't show (and probably don't) enable peripheral instances. The last time I could see them enabled and accessible was in LPCxpresso (8.2.0_647). Further research shows the .cproject file for MCUxpresso doesn't enable the peripheral instances. But they are in .cproject of LPCxpresso. I am assuming that information comes from .cfx file for the microcontroller.  I'm wondering if it is an oversight or intentional. The result is that periph_uart_rb in LPCOpen archive (for LPC1768) no longer works.

Another thing I noticed is if I "import" the project from LPCxpresso environment, the peripheral are available for viewing and programming.

Labels (3)
0 Kudos
12 Replies

1,358 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Thanks for all of your sharing, I will take a ticket to IDE team about this issue.

 

Regards,

Alice

0 Kudos

1,504 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

MCUXpresso IDE’s debug support includes knowledge of an MCU’s peripheral set, this is available via the Peripherals tab within the Project Explorer
pane (once a debug connection is made).
Highlighted in the view below are two peripherals that have been selected for detailed display.

Alice_Yang_0-1611725709228.png

 

Then the peripherals register will be show in Memory view:

Alice_Yang_1-1611725746896.png

 

Hope it helps,

Alice

0 Kudos

1,496 Views
raghavendraraol
Contributor I

What you are saying works IF the views were enabled. Specifically, for LPC1768, these are not enabled and hence cannot be viewed. The only way I could find so far to enable them is to modify the .cproject file. Could you please try a new project with an LPC1768 based board?

  - Thanks,

   - Rao.

 

0 Kudos

1,490 Views
converse
Senior Contributor V

If I remember correctly, for the LPC17 family, the peripherals need to be enabled in the hardware before they can be displayed in the debugger. So, as your code runs and enables each peripheral, then you will be able to display it in the debugger 

0 Kudos

1,484 Views
raghavendraraol
Contributor I

That's what I expected. In some cases, I have the peripheral control registers enabled and in some cases not, in the .cproject file.

With my latest attempt, UART0 works, but as you can noticed in the following screen capture, UART0 still shows in "red" indicating it isn't readable. What I can surmise is that when I change the mcu from 1769 to 1768, the settings in the .cproject for peripheral instances get modified. It would help to know which tool is making the changes.

LPC_UART0.JPG

0 Kudos

1,466 Views
converse
Senior Contributor V

You misunderstand what I said. Your program has to run and actually enable the peripheral in the chip, before it becomes enabled in the debugger view. 

Changing the .cproject file has no effect. (BTW: What are you changing in the .cproject file? I've used these tools for more than 10 years and have NEVER had to manually edit that file)

 

0 Kudos

1,471 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

Could you please take a video about who to use it, because I haven't board for lPC1768, can't test on my side. set a breakpoint afer initialize UART, then check UART

register.

 

BR

Alice

0 Kudos

1,451 Views
raghavendraraol
Contributor I

@Alice_Yang: I'm aware that the peripherals need to be enabled by the user before they can be shown by debugger, and have done that. The screenshot I posted was AFTER the UART was enabled. Unfortunately, I don't think a I can create a video. Besides, there isn't much the video will show. The following are the steps I followed.

1. Use the "Import project(s) from file system..." option to import periph_uart_rb project from lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769.zip archive (in Examples/LPCOpen directory).

2. Change one of the project references from lpc_board_nxp_lpcxpresso_1769 to the library for the board I have (miniDK2 based on LPC1768).

3. Change the include and library paths.

4. Change the MCU setting from LPC1769 to LPC1768.

All these changes are made using the IDE, and no editing of any files is involved.

However, based on my last try, it appears changing the MCU setting, and when the change is made has an effect on what changes are made to .cproject. file (which is used to build the project).

I didn't edit the .cproject file by hand, but looking at the file, it appears original file has some settings for peripheralInstance's are missing when the IDE updated the .cproject file. My guess is that is causing the problem. The original .cproject setting also indicates the setting was determined by "infoFile", but I have no idea where the infoFile, or where it is.

I hope this information can give some clues for you to be able to diagnose the problem.

   - Thanks,

    - Rao.

0 Kudos

1,447 Views
converse
Senior Contributor V

Can you export your project and attach it to this thread?

0 Kudos

1,441 Views
raghavendraraol
Contributor I

@converse 

I'm attaching the exported, .zip'ed file. It can be noticed in the TargetConfig section of .cproject there is nothing about peripherals, while in the older versions (with LPCxpresso), I used to see the peripherals included (apparently obtained from an "info File" ???)

 

0 Kudos

1,431 Views
converse
Senior Contributor V

You are correct - there is definitely a problem. I cannot view the SYSCTRL or any of the UART devices - they are all reported as being disabled (even though they are enabled).

 

NXP - this is a bug, can you report it please?

0 Kudos

1,426 Views
raghavendraraol
Contributor I

@converseand @Alice_Yang 

If it helps, what I noticed is that in the mcuxpresso/ide directory, there is xxx_peripheral.xme file for all the MCU families in com.nxp.mcuxpresso.tools.bin.win32_11.2.0.202009221128/binaries directory, but for LPC17xx family. I haven't found anything yet to look into these files, but my guess is this may be the problem.

0 Kudos