embeded/openRISC2015. 12. 11. 10:19


The OR1200 is a 32-bit scalar RISC with Harvard microarchitecture, 5 stage integer pipeline, virtual memory support (MMU) and basic DSP capabilities.

[링크 : http://opencores.org/or1k/OR1200_OpenRISC_Processor]


CPU CPUID

or1ksim 0x00

OR1200 0x12

mor1kx 0x01

AltOr32 0x32

OR10 0x10

or1knd i5 0xd5


[링크 : http://opencores.org/or1k/OR1K_CPU_Cores]




=== CPUID관련 ===


For now, we have implemented a CPU-ID register, that is SPR_SYS register 9, to allow different stacks in the same memory etc. 


[링크 : http://opencores.com/forum,OpenRISC,0,3666]


    Section 15.2

    Version Register (VR)

    The version register is a 32-bit special-purpose supervisor-level

register accessible with the l.mfspr instruction.

    It identifies the implementation (model) and version of the

OpenRISC 1000 processor.


    [31:24] VER Version

    Implementation-specific version information. This value should

increase for more recent versions. The CPU implementation

specification document should indicate how to interpret this field.


    [23:0] CPUID CPU Identification

    Implementation-specific identification number. Each unique

implementation should have a unique identification value.


[링크 : http://lists.opencores.org/pipermail/openrisc/2011-August/000090.html]


>>> +++ b/newlib/libc/machine/or1k/include/spr-defs.h

>>> @@ -201,6 +201,15 @@

>>>  #define SPR_VR2_CPUID_OFF   24

>>>  #define SPR_VR2_VER_OFF     0

>>>

>>> +/*

>>> + * CPU implementation unique identifiers

>>> + */

>>> +#define SPR_VR2_CPUID_OR1KSIM   0x00

>>> +#define SPR_VR2_CPUID_MOR1KX    0x01

>>> +#define SPR_VR2_CPUID_OR1200    0x12

>>> +#define SPR_VR2_CPUID_ALTOR32   0x32

>>> +#define SPR_VR2_CPUID_OR10      0x10

>>> +


[링크 : http://lists.opencores.org/pipermail/openrisc/2012-December/001171.html]



흐음... 0x13은 머지....

CPU0 : SPR_VR : 0x13000008

CPU1 : SPR_VR : 0x12000008


dprintf("CPU0 : SPR_VR : 0x%X\n", mfspr(SPR_VR));

#define SPR_VR (SPRGROUP_SYS + 0)


/*

 * Bit definitions for the Version Register

 *

 */

#define SPR_VR_VER 0xff000000  /* Processor version */

#define SPR_VR_CFG 0x00ff0000  /* Processor configuration */

#define SPR_VR_RES 0x0000ffc0  /* Reserved */

#define SPR_VR_REV 0x0000003f  /* Processor revision */


#define SPR_VR_VER_OFF 24

#define SPR_VR_CFG_OFF 16

#define SPR_VR_REV_OFF 0 


'embeded > openRISC' 카테고리의 다른 글

openRISC on FPGA  (0) 2018.01.29
or32 컴파일러.. 삽질  (0) 2015.12.14
openrisc 어셈블리  (0) 2015.12.10
openRISC chaintool  (0) 2015.11.27
Posted by 구차니
embeded/openRISC2015. 12. 10. 14:35

공식문서는 없으려나..


arm이나 x86과 다르게

l.nop 식으로 l.이 접두로 붙네...

(폰트 문제로 1.nop 인줄..)


[링크 : https://sourceware.org/cgen/gen-doc/openrisc-insn.html]



+

or1k(openrisk 1000)


명령어 셋별 접두어

ORBIS32/64

l.


ORFPX32/64

lf.


ORVDX64:

lv.


[링크 : https://github.com/openrisc]

    [링크 : https://raw.githubusercontent.com/openrisc/doc/master/openrisc-arch-1.1-rev0.pdf]

[링크 : http://opencores.org/or1k/Main_Page]

    [링크 : http://opencores.org/or1k/Architecture_Specification]



SPR Special-Purpose Register

'embeded > openRISC' 카테고리의 다른 글

openRISC on FPGA  (0) 2018.01.29
or32 컴파일러.. 삽질  (0) 2015.12.14
openRISC OR1k(1000) OR1200  (0) 2015.12.11
openRISC chaintool  (0) 2015.11.27
Posted by 구차니
embeded/raspberry pi2015. 11. 27. 17:34


어?!?! 국내 판매가가 세금포함해서 1.5만이 될줄 알았떠니

VAT 별도로 15485원?!?!?! 에엥?!?!?

5$가 아니라 15$ 였냐!?!?




[링크 : http://www.element14.com/community/docs/DOC-79263/l/introducing-the-raspberry-pi-zero]

'embeded > raspberry pi' 카테고리의 다른 글

openELEC 6.0.0 릴리즈  (0) 2016.01.03
라즈베리 2b lirc + openELEC 설정  (0) 2015.12.12
라즈베리 파이 Zero @ 5$ ?!?!?  (2) 2015.11.26
rtos on rpi  (0) 2015.11.11
clcd - bona cm04075 / lc1628  (0) 2015.11.04
Posted by 구차니
embeded/openRISC2015. 11. 27. 11:53

Latest version

Note: This is not an official release but should still be fine to use.

for Ubuntu 32-bit built from SVN rev. 789, also contains or1ksim


[링크 : http://opencores.org/or1k/Or32Toolchain]



+

or32는 구형 버전이고 신형은 or1k로 시작한다고 한다.


Note: Older versions of the toolchain used the or32- prefix instead of or1k-. Please consider using the new or1k toolchain, unless you have special requirements regarding backwards compatibility with existing code. Binaries, build instructions and more information about the or32- toolchain is available on the or32 toolchain page.

[링크 : http://opencores.org/or1k/OpenRISC_GNU_tool_chain]

'embeded > openRISC' 카테고리의 다른 글

openRISC on FPGA  (0) 2018.01.29
or32 컴파일러.. 삽질  (0) 2015.12.14
openRISC OR1k(1000) OR1200  (0) 2015.12.11
openrisc 어셈블리  (0) 2015.12.10
Posted by 구차니
embeded/raspberry pi2015. 11. 26. 17:14

좀 오바 스럽지만

극단적인 ARM11 + microSD 보드라고 하면되려나?

usb 포트도 1개만 달고(USB 허브 삭제)

CPU 2835로 구형 ARM11 딱 하나에 PoP 구조니 

실장되는건 딱 하나의 BCM2385 칩 하나 ㄷㄷㄷ


그래서 저런 미친 가격이 가능할지도 ㄷㄷ



근데 한국이잖아?

들어 오면 1만원이 되겠지? 안될꺼야.. (먼산)



암튼 이게 대박나면.. 아두이노 따윈 꺼지게 될지도 ㄷㄷ


[링크 : http://makezine.com/2015/11/25/raspberry-pi-announces-5-computer-model-zero/]

'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 2b lirc + openELEC 설정  (0) 2015.12.12
라즈베리 파이 zero...???  (0) 2015.11.27
rtos on rpi  (0) 2015.11.11
clcd - bona cm04075 / lc1628  (0) 2015.11.04
라즈베리 파이 CLCD 라이브러리  (0) 2015.11.03
Posted by 구차니
embeded/Cortex-M3 Ti2015. 11. 17. 17:26

ADCHardwareOversampleConfigure(ADC0_BASE, 64);

소심하게 2 4 8만 했는데 된다!!! 외쳤는데

실은 2^n 승으로 설정되는게 아니라 실제 배수가 설정되는 ㄷㄷ



void

ADCHardwareOversampleConfigure(unsigned long ulBase, unsigned long ulFactor)

{

    unsigned long ulValue;


    //

    // Check the arguments.

    //

    ASSERT((ulBase == ADC0_BASE) || (ulBase == ADC1_BASE));

    ASSERT(((ulFactor == 0) || (ulFactor == 2) || (ulFactor == 4) ||

           (ulFactor == 8) || (ulFactor == 16) || (ulFactor == 32) ||

           (ulFactor == 64)));


    //

    // Convert the oversampling factor to a shift factor.

    //

    for(ulValue = 0, ulFactor >>= 1; ulFactor; ulValue++, ulFactor >>= 1)

    {

    }


    //

    // Write the shift factor to the ADC to configure the hardware oversampler.

    //

    HWREG(ulBase + ADC_O_SAC) = ulValue;


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

uart tx interrupt  (0) 2015.12.18
coflash 구조 및 에러 메시지..  (0) 2015.12.11
lm3s811 / lm31968 adc 사양비교  (0) 2015.11.17
ADC 샘플 시퀀서...  (0) 2015.11.17
axf to bin  (6) 2015.11.11
Posted by 구차니
embeded/Cortex-M3 Ti2015. 11. 17. 15:00

lm3s811

 Four analog input channels
■ Sample rate of 500 thousand samples/second


lm3s1968

Eight analog input channels
■ Sample rate of one million samples/second


샘플링 속도와 채널 차이?



+

SAR은 맞는듯?




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

coflash 구조 및 에러 메시지..  (0) 2015.12.11
ADCHardwareOversampleConfigure()  (0) 2015.11.17
ADC 샘플 시퀀서...  (0) 2015.11.17
axf to bin  (6) 2015.11.11
lm3s1607 / lm3s811 비교  (0) 2015.11.03
Posted by 구차니
embeded/Cortex-M3 Ti2015. 11. 17. 14:37

샘플 시퀀서 설정은.. 소스상으로는 간단한데

ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);

ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_TS | ADC_CTL_IE | ADC_CTL_END);

ADCSequenceEnable(ADC0_BASE, 3); 


설정되는 레지스터는 참.. 여러개다 ㄷㄷ
Hardware Averager 
ADCSAC

FIFO Block
ADCSSFIFO0

Sample Sequencer
ADCSSMUX0
ADCSSCTL0
ADCSSFSTAT0

CTRL/STA
ADCACTSS
ADCOSTAT
ADCUSTAT
ADCSSPRI


---
ADCSequenceConfigure()는 ADC Event MUX를 설정하고
ADC_TRIGGER_PROCESSOR는 Controller(자기 자신?)을 지칭한다.
그러고 보니.. ADC0을 3번 샘플러에 연결하는 건가?


ADCSequenceStepConfigure()가 설정되는 부분으로
ADC_CTL_TS 설정시 내부 온도센서가 설정되며 adc 채널 설정은 무효화 된다(내부 센서 설정이 우선권을 가짐)


그러고 보니.. ADC_CTL_END는 3번 시퀀서에서는 기본으로 설정되는데..

FIFO 뎁스가 SS3은 1이라서 무조건 마지막 샘플만 가능한 걸지도..

그래서 예제는 간단한 SS3 시퀀서를 사용하는 것으로 추측된다.



아무튼 ADC_CTL_TS가 설정되지 않으면 ADC_CTL_CH0~ADC_CTL_CH15 값이

ADC Sample Sequence MUX에 설정이 된다.





음.. 데이터 시트 보면 adc 채널은 8개 인데 시퀀서는 4개(lm3s1968 기준)

그러면 실제로는 4개 채널만 동시 입력이 가능한걸려나?

아니면 시퀀서 설정을 통해 하나의 시퀀서에 FIFO를 통해 8개 채널을 한번에 받을수도 있는 걸려나?


811은 adc가 4채널이니.. 이렇게 2비트로 고르고..


1968은 8채널이라 3비트로 선택이 가능한데.. 흐음..


driverlib에서 ADCSSMUX를 건드리는 함수로는 이렇게만 존재

extern void 

ADCSequenceStepConfigure(unsigned long ulBase, unsigned long ulSequenceNum,

                         unsigned long ulStep, unsigned long ulConfig)


extern void 

ADCSoftwareOversampleStepConfigure(unsigned long ulBase,

                                   unsigned long ulSequenceNum,

                                   unsigned long ulStep,

                                   unsigned long ulConfig)


3. 시퀀서란?

시퀀서란 한마디로 말해서 입력 채널을 조작할 때 외부 회로의 도움 없이 채널의 순서등을 바꿀 수 있게 해주는 기능으로 개발자가 필요 채널을 설정 하거나 한 포인트에서 입력을 중복으로 받아 오거나 할 때 사용한다.



4. 시퀀서 응용

시퀀서의 레지스터 설정은 Data sheet의 레지스터를 보면 알 수 있으니 참고 하도록 하고 이번엔 시퀀서를 응용해서 노이즈를 줄이는 방법을 살펴본다.


[링크 : http://egloos.zum.com/circle5940/v/45303


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

ADCHardwareOversampleConfigure()  (0) 2015.11.17
lm3s811 / lm31968 adc 사양비교  (0) 2015.11.17
axf to bin  (6) 2015.11.11
lm3s1607 / lm3s811 비교  (0) 2015.11.03
bitband 고찰..  (0) 2015.10.23
Posted by 구차니
embeded/freeRTOS2015. 11. 16. 16:45

ADC 은근 공부할게 많네.. 멘붕중


freeRTOS쪽 예제에 레지스터 맵이 잘못되서 EVK랑 교차비교해서 쑈함 -_-

#define SYSCTL_PERIPH_ADC0      0x00100001  // ADC0

#define SYSCTL_PERIPH_ADC1      0x00100002  // ADC1


#define ADC0_BASE               0x40038000  // ADC0

#define ADC1_BASE               0x40039000  // ADC1


초기화

/* Thumb wheel */

SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);

ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);

ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_IE | ADC_CTL_END);

ADCSequenceEnable(ADC0_BASE, 3);

ADCIntClear(ADC0_BASE, 3);

IntEnable(INT_ADC0);



읽기

ADCProcessorTrigger(ADC0_BASE, 3);

while(!ADCIntStatus(ADC0_BASE, 3, false))

{

}

ADCSequenceDataGet(ADC0_BASE, 3, (unsigned long *)ulADC0_Value); 


이런... processortrigger로 읽도록 해놓고 딴걸로 설정했으니 안되지 ㅠㅠ


'embeded > freeRTOS' 카테고리의 다른 글

esp32 freertos  (0) 2023.12.08
stm32 freertos  (0) 2023.12.08
freeRTOS stack & heap 메모리 사용량 예측  (0) 2015.12.16
freertos 자료  (0) 2015.11.12
freeRTOS 패키지?  (0) 2015.11.11
Posted by 구차니
embeded/freeRTOS2015. 11. 12. 11:40



출처 :  http://www.ubinos.org 


[링크 : http://jang574.tistory.com/49]

'embeded > freeRTOS' 카테고리의 다른 글

esp32 freertos  (0) 2023.12.08
stm32 freertos  (0) 2023.12.08
freeRTOS stack & heap 메모리 사용량 예측  (0) 2015.12.16
lm3s811 freeRTOS ADC...  (0) 2015.11.16
freeRTOS 패키지?  (0) 2015.11.11
Posted by 구차니