- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Evnin'...
I am trying to do a simple GPIO initialization in assembler right after boot loader finishes...
.equ | PRT1_DR, | 0x40040100 |
.equ | PRT1_PC, | 0x40040108 |
.equ | PRT1_PC2, | 0x40040118 |
.equ | PRT1_MODE, | 0x00180000 |
.equ | PRT1_MODE2, | 0x00000040 |
@ Blue LED is connected to P1.6, active High
Init:
ldr r0, =PRT1_PC
ldr r1, =PRT1_MODE
str r1, [r0]
ldr r0, =PRT1_PC2
ldr r1, =PRT1_MODE2
str r1, [r0]
ldr r0, =PRT1_DR
movs r1, #64
str r1, [r0]
But to no joy...blue LED is not lit on the CY8KIT-049-42xx board....
- Labels:
-
PSoC 4 Architecture
- Tags:
- gpio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nobody initializes pins using assembler! Configure the pins at design-time or use C-language when reconfiguring at run-time is required.
What do you think they invented C for?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You must be working for another semiconductor company to drive people away using Cypress controller 😉
Anyway....already works...
But I guess we need to go for another controller like Infineon or TI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... and you are sure that the above code will work without modification even when you switch from one PSoC to another? I do not understand why you are using assembly language. What are the benefits??
Bob