Wizchip_cris_enter() & _exti()?
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Wizchip_cris_enter() & _exti()?
by hjjeon0608 ·
안녕하세요.
상기 두 함수는 타이밍이 중요한 SPI interface를 이용하여 W5500으로 access할 때 interrupt 루틴으로 빠지지 않도록 하기 위한 callback function입니다.
즉 interrupt를 disable 시켰다 다시 enable 시키기 위한 함수 입니다.
사용하기 위해서는 사용중인 MCU에 맞는 interrupt enable/disable 함수를 wizchip_cris_enter()/_exit() 함수에 직접 등록하여 사용하시거나
void reg_wizchip_cris_cbfunc(void(*cris_en)(void), void(*cris_ex)(void)) { if(!cris_en || !cris_ex) { WIZCHIP.CRIS._enter = wizchip_cris_enter; WIZCHIP.CRIS._exit = wizchip_cris_exit; } else { WIZCHIP.CRIS._enter = cris_en; WIZCHIP.CRIS._exit = cris_ex; } }이 함수를 이용하여 callback function을 등록하여 사용하시면 됩니다.
감사합니다.
RE: Wizchip_cris_enter() & _exti()?
by jinohkim ·
감사합니다.
spi통신 동안에 오류가 생길까봐 시작할때 인터럽트를 죽였다가 끝나면 살려야 된다는 말씀이시죠?
제가 맞게 이해 했나요?
그럼 mcu의 글로벌 인터럽트를 enable, disable해야 하는거지요?
빠른 답변 감사합니다.
종종 부탁드립니다.
RE: Wizchip_cris_enter() & _exti()?
by hjjeon0608 ·
네 맞게 이해하셨습니다.
글로벌 인터럽트를 시작할때 disable 시켰다가 끝날때 enable 시키면 됩니다.
감사합니다.