'embeded/Cortex-M3 Ti'에 해당되는 글 45건

  1. 2015.11.11 axf to bin 6
  2. 2015.11.03 lm3s1607 / lm3s811 비교
  3. 2015.10.23 bitband 고찰..
  4. 2015.10.13 lm3s617 stepper rdk
  5. 2015.10.06 lm3s spi / ssi
  6. 2015.10.05 lm3s stellarisware SPI
  7. 2015.09.25 cortex-m3 ROM direct call
  8. 2015.08.03 LM3S Stellarisware - GPIOIntTypeSet
  9. 2013.08.16 bitband / cortex-m3
  10. 2013.06.28 LM3S1968과 H-JTAG(wiggler)
embeded/Cortex-M3 Ti2015. 11. 11. 09:54

BIN30과 obj/sample.*은

버전과 프로젝트에 맞춰 넣어주어야 한다.


C:/Keil/ARM/BIN30/fromelf.exe --output obj/sample.bin --bin obj/sample.axf


[링크 : https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/45884]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

lm3s811 / lm31968 adc 사양비교  (0) 2015.11.17
ADC 샘플 시퀀서...  (0) 2015.11.17
lm3s1607 / lm3s811 비교  (0) 2015.11.03
bitband 고찰..  (0) 2015.10.23
lm3s617 stepper rdk  (0) 2015.10.13
Posted by 구차니
embeded/Cortex-M3 Ti2015. 11. 3. 17:55

이렇게 비교하니 차이점이 좀 보이네..

LM3S617 << 스테핑 모터 RDK MCU


 

 lm3s1607

 lm3s811

 uart

 3

 2

 i2c

 2

 1

 timer

 4

 3

 flash / sram

 128k / 32k

 64k / 8k

 PWM

 -

 3

 adc

 8

 4

 analog comparator

 -

 1

 target

■ Remote monitoring 

■ Electronic point-of-sale (POS) machines 

■ Test and measurement equipment 

■ Network appliances and switches

■ Factory automation 

■ HVAC and building control 

■ Gaming equipment

Motion control

■ Medical instrumentation

■ Fire and security 

■ Power and energy 

■ Transportation

■ Factory automation and control

■ Industrial control power devices

■ Building and home automation

Stepper motors

■ Brushless DC motors

AC induction motors


'embeded > Cortex-M3 Ti' 카테고리의 다른 글

ADC 샘플 시퀀서...  (0) 2015.11.17
axf to bin  (6) 2015.11.11
bitband 고찰..  (0) 2015.10.23
lm3s617 stepper rdk  (0) 2015.10.13
lm3s spi / ssi  (0) 2015.10.06
Posted by 구차니
embeded/Cortex-M3 Ti2015. 10. 23. 16:07

이게 정말 효율적일까? 라는 의문이 새록새록


일단.. 주소 연산하려면

* 2번(혹은 << 2번)

+ 1번

3번의 연산


만약 1비트를 조작하기 위해서 저 연산을 해야 하는데...

negation 과 and 연산이면 충분한데.. 오히려 연산량이 더 필요할 지도?

stellarisware의 bitband.c 예제

#define HWREGBITW(x, b)                                                       \

        HWREG(((unsigned long)(x) & 0xF0000000) | 0x02000000 |                \

              (((unsigned long)(x) & 0x000FFFFF) << 5) | ((b) << 2))


    for(ulIdx = 0; ulIdx < 32; ulIdx++)

    {

        HWREGBITW(&g_ulValue, 31 - ulIdx) = (0xdecafbad >> (31 - ulIdx)) & 1;

        PrintValue(g_ulValue);

        Delay(1);

    }




32비트 주소체계라 4바이트 씩 띄엄띄엄 값이 들어있다.


[링크 : http://www.ti.com/lit/ds/symlink/lm3s1968.pdf]

2013/08/16 - [embeded/Cortex-M3 Ti] - bitband / cortex-m3


'embeded > Cortex-M3 Ti' 카테고리의 다른 글

axf to bin  (6) 2015.11.11
lm3s1607 / lm3s811 비교  (0) 2015.11.03
lm3s617 stepper rdk  (0) 2015.10.13
lm3s spi / ssi  (0) 2015.10.06
lm3s stellarisware SPI  (0) 2015.10.05
Posted by 구차니
embeded/Cortex-M3 Ti2015. 10. 13. 11:47

lm3s617외에 같은 클래스에서도 동일한 녀석으로 쓸수 있으려나?
코드를 보니.. 메인을 장악해버려서 다른 프로그램의 하위 시스템으로 넣기에는 엄청난 수정이 필요 할지도..


[링크 : http://www.ti.com/lit/ug/spmu026a/spmu026a.pdf] Stellaris® Stepper Motor Reference Design Kit

[링크 : http://www.ti.com/lit/ds/symlink/lm3s617.pdf] LM3S617

[링크 : http://www.ti.com/product/LM3S617/description]

    [링크 : http://www.ti.com/tool/sw-rdk-stepper-gui]

    [링크 : http://www.ti.com/tool/sw-rdk-stepper]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

lm3s1607 / lm3s811 비교  (0) 2015.11.03
bitband 고찰..  (0) 2015.10.23
lm3s spi / ssi  (0) 2015.10.06
lm3s stellarisware SPI  (0) 2015.10.05
cortex-m3 ROM direct call  (0) 2015.09.25
Posted by 구차니
embeded/Cortex-M3 Ti2015. 10. 6. 09:55


Freescale(구 motorola) / Ti / Microwire(구 National Semiconductor) 포맷?

[링크 : https://engineering.purdue.edu/.../LM4F-LaunchPad-11%20-%20SPI.pdf]


The interface was developed by Motorola and has become a de facto standard. 


SCLK : Serial Clock (output from master).

MOSI : Master Output, Slave Input (output from master).

MISO : Master Input, Slave Output (output from slave).

SS : Slave Select (active low, output from master).


SCLK : SCK, CLK.

MOSI : SIMO, SDI(for slave devices), DI, DIN, SI, MTST.

MISO : SOMI, SDO (for slave devices ), DO, DOUT, SO, MRSR.

SS : nCS, CS, CSB, CSN, EN, nSS, STE, SYNC.


[링크 : https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus]


[링크 : http://irmus.tistory.com/61]

[링크 : http://www.mcublog.co.kr/1828]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

bitband 고찰..  (0) 2015.10.23
lm3s617 stepper rdk  (0) 2015.10.13
lm3s stellarisware SPI  (0) 2015.10.05
cortex-m3 ROM direct call  (0) 2015.09.25
LM3S Stellarisware - GPIOIntTypeSet  (0) 2015.08.03
Posted by 구차니
embeded/Cortex-M3 Ti2015. 10. 5. 16:47

SSIConfigSetExpClk() 에서

모드, 클럭, polarity, 데이터 버스 width를 설정한다.


static void SetSPIFunction(void)

{

SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);


GPIOPinConfigure(GPIO_PA2_SSI0CLK);

GPIOPinConfigure(GPIO_PA3_SSI0FSS);

GPIOPinConfigure(GPIO_PA4_SSI0RX);

GPIOPinConfigure(GPIO_PA5_SSI0TX);


GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_5 | GPIO_PIN_4 | GPIO_PIN_3 | GPIO_PIN_2);

SSIConfigSetExpClk(SSI0_BASE, SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 1000000, 8);

SSIEnable(SSI0_BASE);

}


ssi.h

#define SSI_FRF_MOTO_MODE_0     0x00000000  // Moto fmt, polarity 0, phase 0

#define SSI_FRF_MOTO_MODE_1     0x00000002  // Moto fmt, polarity 0, phase 1

#define SSI_FRF_MOTO_MODE_2     0x00000001  // Moto fmt, polarity 1, phase 0

#define SSI_FRF_MOTO_MODE_3     0x00000003  // Moto fmt, polarity 1, phase 1

#define SSI_FRF_TI              0x00000010  // TI frame format

#define SSI_FRF_NMW             0x00000020  // National MicroWire frame format


#define SSI_MODE_MASTER         0x00000000  // SSI master

#define SSI_MODE_SLAVE          0x00000001  // SSI slave

#define SSI_MODE_SLAVE_OD       0x00000002  // SSI slave with output disabled


[링크 : http://irmus.tistory.com/61]




아두이노의 Atmega 시리즈와 1:1 매칭되려나?


[링크 : https://www.arduino.cc/en/Reference/SPI]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

lm3s617 stepper rdk  (0) 2015.10.13
lm3s spi / ssi  (0) 2015.10.06
cortex-m3 ROM direct call  (0) 2015.09.25
LM3S Stellarisware - GPIOIntTypeSet  (0) 2015.08.03
bitband / cortex-m3  (0) 2013.08.16
Posted by 구차니
embeded/Cortex-M3 Ti2015. 9. 25. 11:30

driverlib 용량이 적진 않아 많이 줄을줄 알았더니..

gcc - 129KB

rvmdk - -1714 KB

ewarm - 945 KB


개노가다 한거 치고는.. 의외로 감소량이 적네... 2KB..

노력대비로는 크다면 클 수 있는 용량이지만 내가 필요로 하는 용량을 충족하진 못하니.. ㅠㅠ

Program Size: Code=64900 RO-data=35872 RW-data=1372 ZI-data=16028  적용전

Program Size: Code=62764 RO-data=35684 RW-data=1372 ZI-data=16028  적용후


감소량

Code      2136 byte

RO-data   188 byte


일단.. 함수들을 ROM_ 접두를 붙이고

#include "driverlib/rom.h"

#define TARGET_IS_DUSTDEVIL_RA0


타겟을 define 해주면 되고

driverlib 에서 누락된 소스들 끌어와주고 그러면 된다(어?)

TARGET_IS_DUSTDEVIL_RA0 The application is being built to run on a DustDevil-class device, silicon revision A0.

TARGET_IS_TEMPEST_RB1 The application is being built to run on a Tempest-class device, silicon revision B1.

TARGET_IS_TEMPEST_RC1 The application is being built to run on a Tempest-class device, silicon revision C1.

TARGET_IS_TEMPEST_RC3 The application is being built to run on a Tempest-class device, silicon revision C3.

TARGET_IS_TEMPEST_RC5 The application is being built to run on a Tempest-class device, silicon revision C5.

TARGET_IS_FIRESTORM_RA2 The application is being built to run on a Firestorm-class device, silicon revision A2.

TARGET_IS_BLIZZARD_RA1 The application is being built to run on a Blizzard-class device, silicon revision A1.


[링크 : http://www.ti.com/lit/ug/spmu019p/spmu019p.pdf] 



그리고는 ROM_ 접두를 붙여주면 끝

단, target class나 함수에 따라 지원하지 않는 녀석들도 있으니 주의


'embeded > Cortex-M3 Ti' 카테고리의 다른 글

lm3s spi / ssi  (0) 2015.10.06
lm3s stellarisware SPI  (0) 2015.10.05
LM3S Stellarisware - GPIOIntTypeSet  (0) 2015.08.03
bitband / cortex-m3  (0) 2013.08.16
LM3S1968과 H-JTAG(wiggler)  (0) 2013.06.28
Posted by 구차니
embeded/Cortex-M3 Ti2015. 8. 3. 17:19

요약하면..

GPIOPortIntRegister(GPIO_PORTA_BASE, PortAIntHandler);

GPIOPinTypeGPIOInput(GPIO_PORTA_BASE,GPIO_PIN_2);

GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_RISING_EDGE);

GPIOPinIntEnable(GPIO_PORTA_BASE, GPIO_PIN_2);

이렇게 셋트로 해주면 P2는 rising_edge에서 PortAIntHandler 핸들러를 호출하게 되는건가?


그리고 핸들러에서는

GPIOPinIntStatus 를 사용해서 핀 별로 처리해주면 될 듯?


9.2.2.11 GPIOPinIntStatus

Gets interrupt status for the specified GPIO port.

Prototype:

long GPIOPinIntStatus(unsigned long ulPort, tBoolean bMasked)

Parameters:

ulPort is the base address of the GPIO port.

bMasked specifies whether masked or raw interrupt status is returned.

Description:

If bMasked is set as true, then the masked interrupt status is returned; otherwise, the raw interrupt status will be returned.

Returns:

Returns a bit-packed byte, where each bit that is set identifies an active masked or raw interrupt, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on. Bits 31:8 should be ignored. 



9.3 Programming Example

The following example shows how to use the GPIO API to initialize the GPIO, enable interrupts,

read data from pins, and write data to pins.

int iVal;
//
// Register the port-level interrupt handler. This handler is the
// first level interrupt handler for all the pin interrupts.
//
GPIOPortIntRegister(GPIO_PORTA_BASE, PortAIntHandler);
//
// Initialize the GPIO pin configuration.
//
// Set pins 2, 4, and 5 as input, SW controlled.
//
GPIOPinTypeGPIOInput(GPIO_PORTA_BASE,
GPIO_PIN_2 | GPIO_PIN_4 | GPIO_PIN_5);
//
// Set pins 0 and 3 as output, SW controlled.
//
GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_3);
//
// Make pins 2 and 4 rising edge triggered interrupts.
//
GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_4, GPIO_RISING_EDGE);
//
// Make pin 5 high level triggered interrupts.
//
GPIOIntTypeSet(GPIO_PORTA_BASE, GPIO_PIN_5, GPIO_HIGH_LEVEL);
//
// Read some pins.
//
iVal = GPIOPinRead(GPIO_PORTA_BASE,
(GPIO_PIN_0 | GPIO_PIN_2 | GPIO_PIN_3 |
GPIO_PIN_4 | GPIO_PIN_5));
//
// Write some pins. Even though pins 2, 4, and 5 are specified, those
// pins are unaffected by this write since they are configured as inputs.
// At the end of this write, pin 0 will be a 0, and pin 3 will be a 1.
//
GPIOPinWrite(GPIO_PORTA_BASE,
(GPIO_PIN_0 | GPIO_PIN_2 | GPIO_PIN_3 |
GPIO_PIN_4 | GPIO_PIN_5),
0xF4);
//
// Enable the pin interrupts.
//
GPIOPinIntEnable(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_4 | GPIO_PIN_5);



9.2.2.4 GPIOIntTypeSet

Sets the interrupt type for the specified pin(s).


Prototype:

void GPIOIntTypeSet(unsigned long ulPort, unsigned char ucPins, unsigned long ulIntType)

Parameters:

ulPort is the base address of the GPIO port.

ucPins is the bit-packed representation of the pin(s).

ulIntType specifies the type of interrupt trigger mechanism.

Description:

This function sets up the various interrupt trigger mechanisms for the specified pin(s) on the selected GPIO port.

The parameter ulIntType is an enumerated data type that can be one of the following values:

GPIO_FALLING_EDGE

GPIO_RISING_EDGE

GPIO_BOTH_EDGES

GPIO_LOW_LEVEL

GPIO_HIGH_LEVEL

where the different values describe the interrupt detection mechanism (edge or level) and the particular triggering event (falling, rising, or both edges for edge detect, low or high for level detect).

The pin(s) are specified using a bit-packed byte, where each bit that is set identifies the pin to be accessed, and where bit 0 of the byte represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.

Note:

In order to avoid any spurious interrupts, the user must ensure that the GPIO inputs remain stable for the duration of this function.

Returns:

None.





[링크 : https://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/48738]

[링크 : http://elk.informatik.fh-augsburg.de/cdrom-stellaris/LM3S811/rasware-read-only/RASLib/src/encoder.c]

    [링크 : http://elk.informatik.fh-augsburg.de/cdrom-stellaris/LM3S811/rasware-read-only/RASLib/src/]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

lm3s stellarisware SPI  (0) 2015.10.05
cortex-m3 ROM direct call  (0) 2015.09.25
bitband / cortex-m3  (0) 2013.08.16
LM3S1968과 H-JTAG(wiggler)  (0) 2013.06.28
cortex-m3 JTAG / X-LinkEx 1.1  (0) 2013.06.11
Posted by 구차니
embeded/Cortex-M3 Ti2013. 8. 16. 17:21

2.2 Bit-Banding (bitband)
This example application demonstrates the use of the bit-banding capabilities of the Cortex-M3
microprocessor. All of SRAM and all of the peripherals reside within bit-band regions, meaning that
bit-banding operations can be applied to any of them. In this example, a variable in SRAM is set to
a particular value one bit at a time using bit-banding operations (it would be more efficient to do a
single non-bit-banded write; this simply demonstrates the operation of bit-banding).



제대로 이해한건진 모르겠지만..

비트 연산자를 사용할때 퍼포먼스향상을 위해 메모리를 왕창 쓰는 기술
비트 조작시 바이트 단위로 조작하고 그걸 하드웨어에서 지원하는 기술

이라고 하면 되려나?

비트 조작시
1. '바이트' 데이터 읽기
2. 쉬프트 연산
3. AND / OR / XOR 등의 연산
4. '바이트' 데이터 쓰기
이런식으로 최소 4 사이클 쓰게 되는데

bitband를 쓰게 되면
1. 주소 연산
2. 바이트 매핑된 '비트' 주소에 데이터 쓰기

이렇게 두번에 끝나게 된다.

[링크 : http://todayis.tistory.com/254]
[링크 : http://liminia.tistory.com/54]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

cortex-m3 ROM direct call  (0) 2015.09.25
LM3S Stellarisware - GPIOIntTypeSet  (0) 2015.08.03
LM3S1968과 H-JTAG(wiggler)  (0) 2013.06.28
cortex-m3 JTAG / X-LinkEx 1.1  (0) 2013.06.11
cortex-m3가 문제인가.. keil이 문제인가?  (2) 2013.02.05
Posted by 구차니
embeded/Cortex-M3 Ti2013. 6. 28. 13:58
예전에 해봤던것 같은데.. 저장이 안되서 캡쳐
H-Flasher에서 칩을 골라주고(onchip으로 잡힘)


Ext XTAL을 설정해주면(eval 보드에 4.19MHz라고 되어 있으니..)


Programming에서 Read 할 수 있다.



2010/07/16 - [embeded/ARM] - ARM JTAG / Wiggler + H-JTAG

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

LM3S Stellarisware - GPIOIntTypeSet  (0) 2015.08.03
bitband / cortex-m3  (0) 2013.08.16
cortex-m3 JTAG / X-LinkEx 1.1  (0) 2013.06.11
cortex-m3가 문제인가.. keil이 문제인가?  (2) 2013.02.05
LM3S - FlashProgram()  (0) 2012.11.06
Posted by 구차니