embeded/Cortex-M3 Ti2016. 2. 18. 14:57

master 인터럽트를 disable 하면 어떻게 작동할까?

우연히 그 타이밍에 발생할 인터럽트가 있었다면.. pending 될까? 아니면 그냥 잊혀지는걸까?



SW-DRL-UG-6288.pdf


13.2.2.3 IntMasterDisable

Disables the processor interrupt.

Prototype:

tBoolean

IntMasterDisable(void)

Description:

Prevents the processor from receiving interrupts. This does not affect the set of interrupts

enabled in the interrupt controller; it just gates the single interrupt from the controller to the

processor.

Note:

Previously, this function had no return value. As such, it was possible to include interrupt.h

and call this function without having included hw_types.h. Now that the return is a

tBoolean, a compiler error will occur in this case. The solution is to include hw_types.h

before including interrupt.h.

Returns:

Returns true if interrupts were already disabled when the function was called or false if they

were initially enabled.


13.2.2.4 IntMasterEnable

Enables the processor interrupt.

Prototype:

tBoolean

IntMasterEnable(void)

Description:

Allows the processor to respond to interrupts. This does not affect the set of interrupts enabled

in the interrupt controller; it just gates the single interrupt from the controller to the processor.

Note:

Previously, this function had no return value. As such, it was possible to include interrupt.h

and call this function without having included hw_types.h. Now that the return is a

tBoolean, a compiler error will occur in this case. The solution is to include hw_types.h

before including interrupt.h.

Returns:

Returns true if interrupts were disabled when the function was called or false if they were

initially enabled.


13.2.2.5 IntPendClear

Unpends an interrupt.

Prototype:

void

IntPendClear(unsigned long ulInterrupt)

Parameters:

ulInterrupt specifies the interrupt to be unpended.

Description:

The specified interrupt is unpended in the interrupt controller. This will cause any previously

generated interrupts that have not been handled yet (due to higher priority interrupts or the

interrupt no having been enabled yet) to be discarded.

Returns:

None.


13.2.2.6 IntPendSet

Pends an interrupt.

Prototype:

void

IntPendSet(unsigned long ulInterrupt)

Parameters:

ulInterrupt specifies the interrupt to be pended.

Description:

The specified interrupt is pended in the interrupt controller. This will cause the interrupt con

troller to execute the corresponding interrupt handler at the next available time, based on the

current interrupt state priorities. For example, if called by a higher priority interrupt handler,

the specified interrupt handler will not be called until after the current interrupt handler has

completed execution. The interrupt must have been enabled for it to be called.

Returns:

None.



interrupt.c


tBoolean

IntMasterEnable(void)

{

    //

    // Enable processor interrupts.

    //

    return(CPUcpsie());

}


tBoolean

IntMasterDisable(void)

{

    //

    // Disable processor interrupts.

    //

    return(CPUcpsid());

}


void

IntEnable(unsigned long ulInterrupt)

{

    //

    // Check the arguments.

    //

    ASSERT(ulInterrupt < NUM_INTERRUPTS);


    //

    // Determine the interrupt to enable.

    //

    if(ulInterrupt == FAULT_MPU)

    {

        //

        // Enable the MemManage interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM;

    }

    else if(ulInterrupt == FAULT_BUS)

    {

        //

        // Enable the bus fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS;

    }

    else if(ulInterrupt == FAULT_USAGE)

    {

        //

        // Enable the usage fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE;

    }

    else if(ulInterrupt == FAULT_SYSTICK)

    {

        //

        // Enable the System Tick interrupt.

        //

        HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN;

    }

    else if((ulInterrupt >= 16) && (ulInterrupt <= 47))

    {

        //

        // Enable the general interrupt.

        //

        HWREG(NVIC_EN0) = 1 << (ulInterrupt - 16);

    }

    else if(ulInterrupt >= 48)

    {

        //

        // Enable the general interrupt.

        //

        HWREG(NVIC_EN1) = 1 << (ulInterrupt - 48);

    }

}


void

IntDisable(unsigned long ulInterrupt)

{

    //

    // Check the arguments.

    //

    ASSERT(ulInterrupt < NUM_INTERRUPTS);


    //

    // Determine the interrupt to disable.

    //

    if(ulInterrupt == FAULT_MPU)

    {

        //

        // Disable the MemManage interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM);

    }

    else if(ulInterrupt == FAULT_BUS)

    {

        //

        // Disable the bus fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS);

    }

    else if(ulInterrupt == FAULT_USAGE)

    {

        //

        // Disable the usage fault interrupt.

        //

        HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE);

    }

    else if(ulInterrupt == FAULT_SYSTICK)

    {

        //

        // Disable the System Tick interrupt.

        //

        HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN);

    }

    else if((ulInterrupt >= 16) && (ulInterrupt <= 47))

    {

        //

        // Disable the general interrupt.

        //

        HWREG(NVIC_DIS0) = 1 << (ulInterrupt - 16);

    }

    else if(ulInterrupt >= 48)

    {

        //

        // Disable the general interrupt.

        //

        HWREG(NVIC_DIS1) = 1 << (ulInterrupt - 48);

    }

}


cpsid / cpsie 어셈블리 인스트럭션을 통해서 마스터 인터럽트를 제어한다.



SetEnable() 시에는 EN0를


SetDisable() 시에는 DIS0를 사용한다.


용도를 찾지 못한.. 이 펜딩.. 머지?



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



음.. disabled interrupt를 펜딩으로 상태를 설정한다?

즉, enable/disable/pending 세가지 상태 중 하나만 가능한건가?


Writing 1 to the ISPR bit corresponding to:

an interrupt that is pending has no effect

a disabled interrupt sets the state of that interrupt to pending.

[링크 :http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/Cihjjifh.html]

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

ekc-lm3s811 를 ICDI로 사용하기  (0) 2016.08.27
cortex-m3 hibernate module...  (0) 2016.04.14
uart tx interrupt  (0) 2015.12.18
coflash 구조 및 에러 메시지..  (0) 2015.12.11
ADCHardwareOversampleConfigure()  (0) 2015.11.17
Posted by 구차니
embeded/raspberry pi2016. 1. 5. 09:43

에뮬레이터 배포판(?)


[링크 : http://blog.petrockblock.com/retropie/]

[링크 : http://blog.petrockblock.com/retropie/retropie-downloads/]

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

지름신 강림! - 라즈베리 2b(본체만)  (0) 2016.03.10
라즈베리 3B?  (0) 2016.03.06
openELEC 6.0.0 릴리즈  (0) 2016.01.03
라즈베리 2b lirc + openELEC 설정  (0) 2015.12.12
라즈베리 파이 zero...???  (0) 2015.11.27
Posted by 구차니
embeded/raspberry pi2016. 1. 3. 20:28

그래서.. TED 라던가..

각종 플러그 인들이 요 근래부터 설치가 안된걸려나?


Published: Sunday, 01 November 2015 23:21


The OpenELEC team is proud to announce OpenELEC 6.0 (6.0.0)


The most visible change is Kodi 15.2 (Isengard). Beginning with Kodi 15.0 most audio encoder, audio decoder, PVR and visualisation addons are no longer pre-bundled into OpenELEC but can be downloaded from the Kodi addon repo if required. PVR backends such as VDR and TVHeadend will install needed dependencies automatically. For further information on Kodi 15.1 please read http://kodi.tv/kodi-15-2-isengard-final-release/.


[링크 : http://openelec.tv/news/22-releases/172-release-openelec-6-0-released]



언어 추가 설치 부터 되는게 없네 -_-

수동으로 zip 파일 받아서 addon 설치 하듯 해야 한다 -_-

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

라즈베리 3B?  (0) 2016.03.06
레트로 파이(retropie)  (0) 2016.01.05
라즈베리 2b lirc + openELEC 설정  (0) 2015.12.12
라즈베리 파이 zero...???  (0) 2015.11.27
라즈베리 파이 Zero @ 5$ ?!?!?  (2) 2015.11.26
Posted by 구차니
embeded/ARM2015. 12. 30. 14:25

집에 있는 DS213j가 armv7 계열인데

문득 보다 보니 feature에 neon이 없는걸 발견


> cat /proc/cpuinfo

Processor       : Marvell PJ4Bv7 Processor rev 1 (v7l)

BogoMIPS        : 1196.85

Features        : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls

CPU implementer : 0x56

CPU architecture: 7

CPU variant     : 0x1

CPU part        : 0x581

CPU revision    : 1


Hardware        : Marvell Armada-370

Revision        : 0000

Serial          : 0000000000000000


검색을 해보니... 

스펙 시트에도 vfp 언급은 있어도 neon은 없어서 다시 검색..

[링크  : http://www.marvell.com/embedded-processors/armada-370/]


엥? 375는 neon 첨가! 370은 없어영~ 라고?!?!

The Armada 375 resembles the Armada 370, which has one of Marvell’s ARMv7-compatible PJ4 cores running at 1.2GHz. Although this home-grown CPU is clocked 20% faster than the 375’s Cortex-A9 cores, it lacks Neon extensions and has a less capable version of the VFP unit.


[링크 : http://www.linleygroup.com/newsletters/newsletter_detail.php?num=5010]

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

j-link segger j-flash  (0) 2016.09.02
ulink flashmagic  (0) 2016.09.02
jtag/swd pullup & pulldown  (0) 2015.12.17
jtag과 swd  (0) 2015.12.14
비글본 github 저장소  (0) 2015.10.30
Posted by 구차니
embeded/Cortex-M3 Ti2015. 12. 18. 16:54

lm3s1607 데이터 시트

TxFIFO가 있는데 이녀석에서 Transmitter로 한 바이트가 보내지면 TX 인터럽트가 떨어진다.

그런 이유로 가장 마지막 바이트가 UART를 통해 보내지는 시점에 (다음 바이트를 받기 위해) TX 인터럽트가 발생한다.

그래서 485 등을 사용시에는 TX 인터럽트 떨어졌다고 바로 TX Enable을 꺼버리면 안된다.



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

cortex-m3 hibernate module...  (0) 2016.04.14
cortex-m3 인터럽트 관련 조사  (0) 2016.02.18
coflash 구조 및 에러 메시지..  (0) 2015.12.11
ADCHardwareOversampleConfigure()  (0) 2015.11.17
lm3s811 / lm31968 adc 사양비교  (0) 2015.11.17
Posted by 구차니
embeded2015. 12. 17. 16:36

대충 보면 어셈인줄 알았는데.. 스크립트라네...


[링크 : http://wiki.osdev.org/Linker_Scripts]


[링크 : http://www.scoberlin.de/content/media/http/informatik/gcc_docs/ld_3.html]

[링크 : http://korea.gnu.org/manual/release/ld/ld-mahajjh/ld_3.html]

'embeded' 카테고리의 다른 글

PCB 마킹 의미  (0) 2016.07.28
COM26T2844VTX 관련...  (0) 2016.03.16
시리얼 저항 / 직렬 저항 / 댐핑 저항  (0) 2015.12.17
microchip PIC  (0) 2015.09.08
9$ computer C.H.I.P?  (0) 2015.05.27
Posted by 구차니
embeded2015. 12. 17. 14:30

이게 다 같은 건가?


일단 이걸 쓰는 이유는

1. 전류제한

2. 임피던스 매칭으로 노이즈 제거

3. 전압변경(좋은 방법은 아니지만)

등등등...


[링크 : http://programfrall.tistory.com/43]

[링크 : http://pcbee.tistory.com/entry/직렬series-저항-값에-대한-고찰]

[링크 : http://blog.naver.com/rlaghlfh/110127337569] 댐핑 저항

[링크 : http://www.solvline.com/technical_info/tech_note_view.php?no=24] 종단 저항(terminator)

'embeded' 카테고리의 다른 글

COM26T2844VTX 관련...  (0) 2016.03.16
링커 스크립트 문법(ld syntax)  (0) 2015.12.17
microchip PIC  (0) 2015.09.08
9$ computer C.H.I.P?  (0) 2015.05.27
PowerQUICC  (0) 2015.04.02
Posted by 구차니
embeded/ARM2015. 12. 17. 13:44

흐음...


pull up/down 저항이 낮아서 문제가 되려나?

[링크 : http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/348680/1220668]

[링크 : http://www.alteraforum.com/forum/archive/index.php/t-32059.html]



JTAG ModeSWD ModeSignalRequired pull-up / pull-down (if not implemented internally by MCU)
TCKSWCLKClock into the coreUse 10K-100K Ohm pull-down resistor to GND
TDI-JTAG Test Data InputUse 10K-100K Ohm pull-up resistor to VCC
TDOSWVJTAG Test Data Output / SWV trace data output (SWO)Use 10K-100K Ohm pull-up resistor to VCC
TMSSWDIOJTAG Test Mode Select / SWD data in/outUse 10K-100K Ohm pull-up resistor to VCC
GNDGND--

[링크 : https://www.lpcware.com/content/faq/lpcxpresso/debug-design]

[링크 : http://www.support.code-red-tech.com/CodeRedWiki/HardwareDebugConnections] 조만간 폭파


SignalConnects to...
TMSTest Mode State pin — Use 100K Ohm pull-up resistor to VCC.
TDOTest Data Out pin.
RTCKJTAG Return Test ClocK. (see Note below)
TDITest Data In pin — Use 100K Ohm pull-up resistor to VCC.
TRSTTest ReSeT/ pin — Use 100K Ohm pull-up resistor to VCC. TRST is optional and not available on some devices. You may leave it unconnected.
TCLKTest CLocK pin — Use 100K Ohm pull-down resistor to GND.
VCCPositive Supply Voltage — Power supply for JTAG interface drivers.
GNDDigital ground.
RESETRSTIN/ pin — Connect this pin to the (active low) reset input of the target CPU.
CPUCLKCPU clock (according IEEE Standard 1149.1).
OCDSEEnable/Disable OCDS interface (Infineon-specific).
TRAPTrap condition (Infineon-specific).
BRKINHardware break in (Infineon-specific).
BRKOUTHardware break out (Infineon-specific).
/JENJTAG Enable (STMicroelectronics specific).
TSTATJTAG ISP Status (STMicroelectronics specific) (optional).
/RSTChip reset (STMicroelectronics specific).
/TERRJTAG ISP Error (STMicroelectronics specific) (optional).

[링크 : http://www.keil.com/support/man/docs/ulink2/ulink2_hw_connectors.htm]

[링크 : http://forum.falinux.com/zbxe/?document_srl=796669...]

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

ulink flashmagic  (0) 2016.09.02
armada 370 - ARMv7 인데 neon이 없네?  (0) 2015.12.30
jtag과 swd  (0) 2015.12.14
비글본 github 저장소  (0) 2015.10.30
arm9 dsp / arm11 simd instuction 비교?  (0) 2015.10.01
Posted by 구차니
embeded/freeRTOS2015. 12. 16. 16:25

음.. 소스 레벨에서는 역시 무리이고..

돌려보고 최대로 먹는거 보면서 분할을 해줘야 하려나?


[링크 : http://www.freertos.org/FAQMem.html]

[링크 : http://www.microchip.com/forums/m590414.aspx]

    [링크 : http://sourceforge.net/p/freertos/discussion/382005/thread/33791e60/]

    [링크 : http://www.freertos.org/uxTaskGetStackHighWaterMark.html]

    [링크 : http://www.freertos.org/Stacks-and-stack-overflow-checking.html]

[링크 : http://www.freertos.org/a00111.html]

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

esp32 freertos  (0) 2023.12.08
stm32 freertos  (0) 2023.12.08
lm3s811 freeRTOS ADC...  (0) 2015.11.16
freertos 자료  (0) 2015.11.12
freeRTOS 패키지?  (0) 2015.11.11
Posted by 구차니
embeded/openRISC2015. 12. 14. 13:47

걍 포기할까...

LD_LIBRARY_PATH 잘못설정하면 절대 좋은꼴을 못보는데... ㄷㄷㄷ


./as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

$ sudo apt-get install zlib1g:i386

$ sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5

[링크 : http://stackoverflow.com/questions/21256866/libz-so-1-cannot-open-shared-object-file]



/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory


export LD_LIBRARY_PATH="/usr/local/lib" sudo ldconfig


[링크 : http://stackoverflow.com/.../cc1-error-while-loading-shared-libraries-libmpc-so-2-...c]



$ sudo find / -name "libmpc.so.*"

/usr/lib/x86_64-linux-gnu/libmpc.so.2.0.0

/usr/lib/x86_64-linux-gnu/libmpc.so.2


$ sudo apt-cache search libmpc

libmpc-dev - multiple precision complex floating-point library development package

libmpc2 - multiple precision complex floating-point library

libmpcdec-dev - MusePack decoder - development files

libmpcdec6 - MusePack decoder - library

mppenc - Musepack lossy audio codec encoder


이거.. 볼수록 잘못 건드리면 헬게이트 열릴 기분인데?



as: error while loading shared libraries: libopcodes-2.23.51.20121129.so: cannot open shared object file: No such file or directory

미친척 or1k껄로 했더니 여전히 헬게이트.. 걍 포기


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

openRISC on FPGA  (0) 2018.01.29
openRISC OR1k(1000) OR1200  (0) 2015.12.11
openrisc 어셈블리  (0) 2015.12.10
openRISC chaintool  (0) 2015.11.27
Posted by 구차니